A method and apparatus for synchronizing a local clock value in a wireless
receiver receiving a data unit containing synchronization information.
The method includes receiving a first data unit containing
synchronization information, extracting the synchronization information
from the received first data unit, copying a local free-running clock at
a known reference point in time relative to the time the first data unit
was received to generate a local timestamp; and calculating an offset to
the free-running clock using the extracted synchronization information
and the local timestamp, the calculating in non real-time, such that the
sum of the calculated offset and the value of the free-running clock
provides a local clock value that is approximately synchronized in time.
The apparatus implementing the method is part of a node of a wireless
station, and provides a time synchronization function, typically at the
MAC layer.