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:
parent
8fe93ace65
commit
02aa3ecdf2
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue