ClockWork
Herbert zur Nedden (9470) 41 posts |
Hi, triggered by the recent discussions on the topic of the system clock in some cases not being up to date I wrote a small command line tool named “ClockWork” that is happy to sit in !Boot.Choices.Boot.Tasks and upon booting will indicate if the system clock seems odd. What it does is this: Since I wanted that small tool to be self-contained there are two tricks: You can find ClockWork on https://gag.de/software/clockwork.html – it is freeware. At some point I will include the source code too – I just rather wait for the odd feedback in case it suggests enhancements. Cheers Herbert (publisher of GAG-News since by now over 30 years) Note: This was a good timing since I just recently looked into working with RISC OS time stamps using C for the C programming series in GAG-News :-) |
Rick Murray (539) 13855 posts |
Yeah, it’s not exactly obvious how to bash a five byte time into something that can be used with C. I note that CLib jumps through hoops to do it. ;) |
Stuart Swales (8827) 1357 posts |
These days, just bosch it into a uint64_t. |
Herbert zur Nedden (9470) 41 posts |
Try this code to convert them 5 byte into a number (instead of t_Centiseconds you can probably use unit64_t too): typedef unsigned long long t_Centiseconds; t_Centiseconds Centiseconds; Centiseconds = 0; |