#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <err.h>

int
main(int argc, char *argv[])
{
    struct timespec ts;
    time_t t;

    t = time(NULL);
    printf("datetime/before: %s", ctime(&t));

    t += 24 * 60 * 60;
    ts.tv_sec = t;
    ts.tv_nsec = 254254254;

    if (clock_settime(CLOCK_REALTIME, &ts) == -1)
        err(EXIT_FAILURE, "clock_settime");

    t = time(NULL);
    printf("datetime/after: %s", ctime(&t));
    exit(EXIT_SUCCESS);
}
