When using show_age_threshold the time delta seems to not include time where the computer was suspended.
Relevant code:
|
gint64 hours, minutes, seconds; |
|
gint64 t_delta = g_get_monotonic_time() - n->timestamp; |
From GLib:Date_and_Time_Functions(3):
g_get_monotonic_time ()
gint64 g_get_monotonic_time (void);
Queries the system monotonic time, if available.
On POSIX systems with clock_gettime() and CLOCK_MONOTONIC this call is a very
shallow wrapper for that. Otherwise, we make a best effort that probably involves
returning the wall clock time (with at least microsecond accuracy, subject to the
limitations of the OS kernel).
It's important to note that POSIX CLOCK_MONOTONIC does not count time spent while
the machine is suspended.
Side note: it would also be good to skip calculating t_delta altogether if show_age_threshold is not used.
- Version: 1.3.1 (2018-01-30)
- Distro and version: Arch Linux
When using
show_age_thresholdthe time delta seems to not include time where the computer was suspended.Relevant code:
dunst/src/notification.c
Lines 514 to 515 in 8735c9d
From
GLib:Date_and_Time_Functions(3):Side note: it would also be good to skip calculating
t_deltaaltogether ifshow_age_thresholdis not used.