ABSTRACT

ThreadX provides two services for interacting with the internal system clock—getting the current time and setting the clock to a new value. ThreadX sets the internal system clock to zero during application initialization, and each timer-tick increases the clock by one. Applications can perform exactly two actions on the internal system clock: either read the current clock value, or set its value. The tx_time_get service retrieves the current time from the internal system clock. The tx_time_set service sets the current time of the internal system clock to some specified value. The characteristics of each application timer are found in its Application Timer Control Block. As with the other Control Blocks, ThreadX prohibits an application from explicitly modifying the Application Timer Control Block. A periodic timer expires repeatedly until it is stopped, with each expiration resulting in a call to its expiration function. A periodic timer has an initial expiration value, and a reschedule value for continuing expirations.