tsc: initial implementation of timekeeper source

This commit is contained in:
Matheus
2024-09-29 16:30:08 -03:00
parent 0fff338065
commit c3eef02d50
5 changed files with 83 additions and 4 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ static inline time_t timespec_us(timespec_t a) {
static inline timespec_t timespec_from_us(time_t us) {
timespec_t ts = {
.s = us / 1000000,
.ns = (us % 1000000) * 100
.ns = (us * 1000) % 1000000000
};
return ts;