add clockGetMillis()

This commit is contained in:
John
2022-09-10 14:21:39 +02:00
parent 327704ff3b
commit 1612080391
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -44,4 +44,10 @@ void clockGettime(struct timespec* t) {
#endif
}
long long clockGetMillis() {
struct timespec t;
clockGettime(&t);
return t.tv_sec*1000LL + t.tv_nsec / 1000000;
}
} // namespace ebusd