1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

update timestamp hook example to new message format

This commit is contained in:
Steffen Vogel 2015-06-05 12:41:25 +02:00
parent 8fe93ace65
commit 02aa3ecdf2

View file

@ -67,9 +67,8 @@ int hook_tofixed(struct msg *m, struct path *p, struct timespec *ts)
int hook_ts(struct msg *m, struct path *p, struct timespec *ts)
{
struct timespec *ts = (struct timespec *) &m->data[HOOK_TS_INDEX];
clock_gettime(CLOCK_REALTIME, ts);
m->ts.sec = ts->tv_sec;
m->ts.nsec = ts->tv_nsec;
return 0;
}