A device , comprising: an interface , which, in operation, receives a data stream of a network (100; 500); and Time Division Multiple Access, TDMA, Medium Access Control, MAC, circuitry , coupled to the interface , wherein the TDMA MAC circuitry , in operation: detects a first beacon packet in a first frame of the data stream , wherein a frame is a period of time having a defined frame duration, as a result of said first beacon packet being detected , initializes a variable, the variable being incremented at each new frame in the data stream to track a number of elapsed frames; detects a second beacon packet in a second frame of the data stream and determines a real start time of said second frame , a reference start time of said second frame , and a number of frames that have elapsed since said first frame in which a first beacon was received; determines a frame duration compensation value based on said real start time of said second frame , said reference start time of said second frame , and said number of frames that have elapsed since said first frame in which a first beacon was received; and determines a current frame duration value based on the determined frame duration compensation value and the defined frame duration. an interface , which, in operation, receives a data stream of a network (100; 500); and Time Division Multiple Access, TDMA, Medium Access Control, MAC, circuitry , coupled to the interface , wherein the TDMA MAC circuitry , in operation: detects a first beacon packet in a first frame of the data stream , wherein a frame is a period of time having a defined frame duration, as a result of said first beacon packet being detected , initializes a variable, the variable being incremented at each new frame in the data stream to track a number of elapsed frames; detects a second beacon packet in a second frame of the data stream and determines a real start time of said second frame , a reference start time of said second frame , and a number of frames that have elapsed since said first frame in which a first beacon was received; determines a frame duration compensation value based on said real start time of said second frame , said reference start time of said second frame , and said number of frames that have elapsed since said first frame in which a first beacon was received; and determines a current frame duration value based on the determined frame duration compensation value and the defined frame duration. detects a first beacon packet in a first frame of the data stream , wherein a frame is a period of time having a defined frame duration, as a result of said first beacon packet being detected , initializes a variable, the variable being incremented at each new frame in the data stream to track a number of elapsed frames; detects a second beacon packet in a second frame of the data stream and determines a real start time of said second frame , a reference start time of said second frame , and a number of frames that have elapsed since said first frame in which a first beacon was received; determines a frame duration compensation value based on said real start time of said second frame , said reference start time of said second frame , and said number of frames that have elapsed since said first frame in which a first beacon was received; and determines a current frame duration value based on the determined frame duration compensation value and the defined frame duration. <EOS>