## 2 Literature Review  
The problems of clock offset and clock skew are well known and many research and solution propositions are already used in wireless sensor systems. There are many surveys and propositions of clock skew approximation, simulation, and clock resynchronization. Ref. [3] presents an extensive survey and analysis of clock synchronization protocols for wireless networks, along with a classification of such protocols, and [8] presents another extensive survey focusing on two representative protocols--Reference Broadcasting Synchronization (RBS) and Timing-synch Protocol for Sensor Networks (TSPN). One of the most obvious methods to achieve general synchronization of network devices is the use of GPS to synchronize devices with UTC. One of the propositions was presented in [9] and later optimized in [10] by the same authors. Although the accuracy of this method is quite high, even with energy consumption optimization GPS still requires periodic uptime, and the more accurate synchronization we need the more frequent it becomes. In addition, this requires the device to be equipped with a GPS module, which is not always possible. Microprocessor systems usually use crystal oscillators as a time source. These are electronic devices that use the mechanical resonance of a piezoelectric material crystal to provide a constant frequency signal [11]. The crystal clocks have drift and do not run at the same rate as a reference clock, gradually desynchronizing from the other clocks. The frequency stability of the oscillator is subject to multiple factors affecting crystal oscillator frequency accuracy, such as temperature, aging, electric current level, and retrace (when power is removed from an oscillator and re-applied on it again, the frequency of this oscillator will stabilize at a slightly different value) [12]. Apart from the external factors such as temperature, there are quite a few research papers showing that the crystal oscillator drift has a normal (Gaussian) distribution [13; 14; 15]. In previous research, some authors proposed using the Bayesian approach or [16], machine learning, and Kalman filters[17] to predict the drift. Nevertheless, it gives only the answer on the expected time skew, not showing how to define the listening window to receive a message transmitted by a device with a desynchronized clock. The authors of [18] present a solution to the clock skew problem in a sensor wireless network environment similar to our case. The proposed algorithm uses a non-standard approach where data measurements are synchronized by a per-hop method, as the data travel through the network to the sink node, which is different from the usual approach of clock synchronization. The fact that the system is being synchronized using data timestamps gives it higher flexibility and ability to cope with network topology changes. Ref. [19] presents a synchronization mechanism with an approximation of how temperature influences clock skew and gives insight into how the clock is influenced by temperature and how to deal with these important problems in systems implemented in an environment heavily influenced by temperature shifts. A new method for access control and mitigation of interfering noise in time synchronization environments is presented in [20]. Another paper that focuses on clock synchronization in a wireless network environment is [21]; here the authors propose an internal distributed clock synchronization solution using the group neighborhood average, where group averaging of offset and skew rate value are calculated instead of a conventional point-to-point averaging method. The authors of [22] focus on clock synchronization in the industrial Internet of Things (IIoT) with LoRa networks. Paper [23] proposes an algorithm for joint clock-skew and range estimation based on weighted least squares (WLS) using the ideas of 2-D frequency estimation.