timer: Add two more helper functions

This commit is contained in:
Daan De Meyer
2023-10-20 14:09:32 +02:00
parent f57cc32fa1
commit f8a990a0a1
3 changed files with 41 additions and 17 deletions
+4
View File
@@ -72,6 +72,8 @@ struct ActivationDetailsTimer {
#define TIMER_MONOTONIC_CLOCK(t) ((t)->wake_system ? CLOCK_BOOTTIME_ALARM : CLOCK_MONOTONIC)
uint64_t timer_next_elapse_monotonic(const Timer *t);
void timer_free_values(Timer *t);
extern const UnitVTable timer_vtable;
@@ -80,6 +82,8 @@ extern const ActivationDetailsVTable activation_details_timer_vtable;
const char *timer_base_to_string(TimerBase i) _const_;
TimerBase timer_base_from_string(const char *s) _pure_;
char* timer_base_to_usec_string(TimerBase i);
const char* timer_result_to_string(TimerResult i) _const_;
TimerResult timer_result_from_string(const char *s) _pure_;