diff --git a/Changelog b/Changelog index 3da211b..9527577 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2.2] +* Support fractional-second intervals on recurring timers. (caf) + * Change $geom() to return current screen's geometry, not the original terminal's. (caf) diff --git a/include/struct.h b/include/struct.h index 692258c..f900a2f 100644 --- a/include/struct.h +++ b/include/struct.h @@ -1043,7 +1043,7 @@ typedef struct timerlist_stru char *command; char *subargs; int events; - time_t interval; + double interval; int server; int window; char *whom; diff --git a/source/timer.c b/source/timer.c index c185322..828aa69 100644 --- a/source/timer.c +++ b/source/timer.c @@ -421,8 +421,8 @@ char *function_timer(char *n, char *args) if (time_left < 0) time_left = 0.0; - return m_sprintf("%s %d %d %ld %d %0.3f %s%s", t->ref, t->server, - t->window, (long)t->interval, t->events, time_left, + return m_sprintf("%s %d %d %.16g %d %0.3f %s%s", t->ref, t->server, + t->window, t->interval, t->events, time_left, t->callback ? "(internal callback) " : t->command, t->whom ? t->whom : ""); }