README


bigtime


Example Summary

This application demonstrates how to use the SYS/BIOS Clock and Task modules in a C++ application, to create a real-time clock/calendar.

Example Usage

Run the application. The current times of two Clock objects (id 1 and id 2) will be output to the console. By default the program will terminate after 2 seconds. The program can be modified to run longer, or continuously, by changing when the call to clockTerminate() is made.

The default output:

bigTime started.
id 1 : 0:0:0.0
id 1 : August 19, 2010
id 2 : 0:0:0
id 2 : August 19, 2010
id 1 : 0:0:0.1
id 1 : August 19, 2010
id 1 : 0:0:0.2
id 1 : August 19, 2010
id 1 : 0:0:0.3
id 1 : August 19, 2010
id 1 : 0:0:0.4
id 1 : August 19, 2010
id 1 : 0:0:0.5
id 1 : August 19, 2010
id 1 : 0:0:0.6
id 1 : August 19, 2010
id 1 : 0:0:0.7
id 1 : August 19, 2010
id 1 : 0:0:0.8
id 1 : August 19, 2010
id 1 : 0:0:0.9
id 1 : August 19, 2010
id 1 : 0:0:1.0
id 1 : August 19, 2010
id 2 : 0:0:1
id 2 : August 19, 2010
bigTime ended.

Application Design Details

See the projects’ main function for more information on how the SYS/BIOS objects are constructed.

You can experiment with advancing Clock at different rates by changing the Clock::tick function

Some targets utilize the RTOS analyzer to output the Clock times as Log_info events rather than using System_printf. To view the logs, open Tools->RTOS Analyzer->Printf and Error Logs and switch to the Live Session tab.

References