The Prometheus MOO
unread,Sep 13, 2015, 3:48:37 PM9/13/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to moo-...@googlegroups.com
tasks.cc: In function ‘time_t get_start_time(task*)’:
tasks.cc:98:5: error: named return values are no longer supported
return t->kind == TASK_FORKED ? t->t.forked.start_tv :
t->t.suspended.start_tv
^
tasks.cc:107:23: error: ‘after_seconds’ was not declared in this scope
delta.tv_sec = floor(after_seconds);
^
tasks.cc:110:6: warning: statement has no effect [-Wunused-value]
when;
^
tasks.cc:111:1: warning: no return statement in function returning
non-void [-Wreturn-type]
}
^
tasks.cc: At global scope:
tasks.cc:114:1: error: expected unqualified-id before ‘}’ token
}
^
tasks.cc:114:1: error: expected declaration before ‘}’ token
<builtin>: recipe for target 'tasks.o' failed
make: *** [tasks.o] Error 1
make exited with status code 2
The tasks.cc file has something close to the beginning that i don't
understand. The part where the diff says:
#define GET_START_TIME(ttt) \
(ttt->kind == TASK_FORKED \
- ? ttt->t.forked.start_time \
- : ttt->t.suspended.start_time)
+ ? &ttt->t.forked.start_tv \
+ : &ttt->t.suspended.start_tv)
+
+
+static inline struct timeval
+double_to_start_tv(double after_seconds)
+{
+ struct timeval now, delta, when;
+
+ gettimeofday(&now, NULL);
+ delta.tv_sec = floor(after_seconds);
+ delta.tv_usec = 1000000. * (after_seconds - delta.tv_sec);
+ timeradd(&now, &delta, &when);
+ return when;
+}
static void
I don't fully realize as in how I should go with putting that part. The
values are different and I tried to change them to the new ones, well,
apparently it didn't want to work out.