blob: b76923b48c7ff2aaf6a3c3e0df07808ef51b450c [file] [log] [blame]
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <time.h>
#include <stdio.h>
int main() {
struct timespec clock_boottime;
struct timespec clock_monotonic;
clock_gettime(CLOCK_BOOTTIME, &clock_boottime);
clock_gettime(CLOCK_MONOTONIC, &clock_monotonic);
printf(" \"CLOCK_BOOTTIME\": { \"seconds\": %10ld, \"nanos\": %10ld },\n",
clock_boottime.tv_sec, clock_boottime.tv_nsec);
printf(" \"CLOCK_MONOTONIC\": { \"seconds\": %10ld, \"nanos\": %10ld }\n",
clock_monotonic.tv_sec, clock_monotonic.tv_nsec);
return 0;