Request: on Linux, option to use system uptime instead of program uptime
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 280
- Avg merge
- 7m
- Merged PRs (30d)
- 4
Description
In my use case at `$work`, I need to correlate loguru logs from a userspace program with dmesg output. Unfortunately, this is an old enough system that it does not support `dmesg -T` :(. Therefore, it would be very helpful for the loguru "uptime" field to have an option to use the system uptime. That can be had using [`clock_gettime()`](https://linux.die.net/man/2/clock_gettime):
```
#include
#include
int main()
{
struct timespec ts;
clock_gettime(CLOCK_BOOTTIME, &ts);
printf("%f\n", ts.tv_sec + (double)ts.tv_nsec/1e9);
return 0;
}
```
Would you be willing to add this as a compile-time or run-time option? Thank you for considering this request!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.