chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Shun time(), since on Linux it is not monotonic with gettimeofday().
[disorder]
/
server
/
schedule.c
diff --git
a/server/schedule.c
b/server/schedule.c
index ec7eddce118d49b901055994372be1b13035f23a..2669feded9aa0518a8812895d67a11afd4ea5143 100644
(file)
--- a/
server/schedule.c
+++ b/
server/schedule.c
@@
-182,7
+182,7
@@
static int schedule_init_tid(ev_source *ev,
}
when.tv_usec = 0;
/* The action might be in the past */
}
when.tv_usec = 0;
/* The action might be in the past */
- if(when.tv_sec < time(0)) {
+ if(when.tv_sec <
x
time(0)) {
const char *priority = kvp_get(actiondata, "priority");
if(priority && !strcmp(priority, "junk")) {
const char *priority = kvp_get(actiondata, "priority");
if(priority && !strcmp(priority, "junk")) {
@@
-287,7
+287,7
@@
const char *schedule_add(ev_source *ev,
when.tv_sec = atoll(kvp_get(actiondata, "when"));
when.tv_usec = 0;
/* Reject events in the past */
when.tv_sec = atoll(kvp_get(actiondata, "when"));
when.tv_usec = 0;
/* Reject events in the past */
- if(when.tv_sec <= time(0)) {
+ if(when.tv_sec <=
x
time(0)) {
error(0, "new scheduled event is in the past");
return 0;
}
error(0, "new scheduled event is in the past");
return 0;
}