Skip to content

Commit

Permalink
[log] change time milliseconds to us
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzukiTsuru committed Jan 14, 2024
1 parent 6db9b5b commit cdc60ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/log/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ void printk(int level, const char *fmt, ...) {
if (level < LOG_LEVEL_DEFAULT) {
return;
}
uint32_t now_timestamp = time_ms() - get_init_timestamp();
uint32_t seconds = now_timestamp / 1000;
uint32_t milliseconds = now_timestamp % 1000;
uint32_t now_timestamp = time_us() - get_init_timestamp();
uint32_t seconds = now_timestamp / (1000 * 1000);
uint32_t milliseconds = now_timestamp % (1000 * 1000);

switch (level) {
case LOG_LEVEL_TRACE:
Expand Down

0 comments on commit cdc60ca

Please sign in to comment.