Added us resolution to logs via stderr/stdout
This commit is contained in:
parent
b551e9e5c7
commit
a8773fad82
2 changed files with 4 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ Expected: February 2024
|
||||||
|
|
||||||
### Minor features
|
### Minor features
|
||||||
|
|
||||||
|
* Added us resolution to logs via stderr/stdout
|
||||||
* New command-line debug mechanism
|
* New command-line debug mechanism
|
||||||
* Separation between subject-area and details
|
* Separation between subject-area and details
|
||||||
* Multiple subject-areas
|
* Multiple subject-areas
|
||||||
|
|
|
||||||
|
|
@ -254,9 +254,10 @@ flogtime(FILE *f)
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
localtime_r((time_t*)&tv.tv_sec, &tm);
|
localtime_r((time_t*)&tv.tv_sec, &tm);
|
||||||
fprintf(f, "%s %2d %02d:%02d:%02d: ",
|
fprintf(f, "%s %2d %02d:%02d:%02d.%06d: ",
|
||||||
mon2name(tm.tm_mon), tm.tm_mday,
|
mon2name(tm.tm_mon), tm.tm_mday,
|
||||||
tm.tm_hour, tm.tm_min, tm.tm_sec);
|
tm.tm_hour, tm.tm_min, tm.tm_sec,
|
||||||
|
tv.tv_usec);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue