win_time.c 341 B

12345678910111213141516
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #include "platform_api_vmcore.h"
  6. uint64
  7. os_time_get_boot_microsecond()
  8. {
  9. struct timespec ts;
  10. timespec_get(&ts, TIME_UTC);
  11. return ((uint64)ts.tv_sec) * 1000 * 1000 + ((uint64)ts.tv_nsec) / 1000;
  12. }