SrtmDateTime Sample
Description
This program is based on the SRTM sample. In addition to sampling the system response time, the program retrieves the date and time before and after the measurement duration. It then uses the retrieved date and time to calculate the duration. Since the date and time are retrieved with different RTAPIs, which are based on different hardware resources (mainly PC RTC, APIC Timer, and CPU TSC), deviations exist among the calculated durations.
Source Files
| File | Description |
|---|---|
| SrtmDateTime.c |
The main source file. |
Usage
Run SrtmDateTime.ertos
Examples
This example was generated on an Intel® Comet Lake i7 system using the following command line syntax:
Run SrtmDateTime.ertos /f /h 60
Output
GetTimeZoneInformation() returns: TIME_ZONE_ID_STANDARD
TzInfo.Bias: 300 (minutes)
TzInfo.StandardName: EST
[TzInfo.StandardDate] Milli: 0, Seconds: 0, Minutes: 0, Hours: 2
Day: 1, DayOfWeek: 0, Month: 11, Year: 0
TzInfo.StandardBias: 0 (minutes)
TzInfo.DaylightName: EDT
[TzInfo.DaylightDate] Milli: 0, Seconds: 0, Minutes: 0, Hours: 2
Day: 2, DayOfWeek: 0, Month: 3, Year: 0
TzInfo.DaylightBias: -60 (minutes)
SrtmDateTime timer delivery latencies for a periodic eRTOS timer on Processor - 0:
Timer Period = 100 us, Clock Resolution = 0.1 us.
Summary on Processor - 0
[Start LocalTime] Milli: 504, Seconds: 49, Minutes: 38, Hours: 11
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[End LocalTime] Milli: 504, Seconds: 49, Minutes: 39, Hours: 11
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[Start SystemTime] Milli: 504, Seconds: 49, Minutes: 38, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[End SystemTime] Milli: 504, Seconds: 49, Minutes: 39, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[Start ClockTime] Milli: 504, Seconds: 49, Minutes: 38, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[End ClockTime] Milli: 504, Seconds: 49, Minutes: 39, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[Start RtssFileTime] Milli: 504, Seconds: 49, Minutes: 38, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
[End RtssFileTime] Milli: 504, Seconds: 49, Minutes: 39, Hours: 16
Day: 23, DayOfWeek: 5, Month: 2, Year: 2024
FileTimeDt: 0x3938700 (us)
ClockTimeDt: 0x39386fa (us)
PerfTimeDt: 0x39386fa (us)
FileTimeDt - PerfTimeDt = 0x6(us), (6us)
ClockTimeDt - PerfTimeDt = 0x0(us), (0us)
Sample Period = 60 s, Total Ticks = 599999, Latencies above 100 us = 0.
Minimum = 1 us, Average = 1 us, Maximum = 2 us
Histogram:
0 - 1 us: 0 ***
1 - 2 us: 599999
2 - 1000 us: 0 ***
APIs Referenced