File: default-mach.c

package info (click to toggle)
libcpucycles 0~20240318-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 476 kB
  • sloc: ansic: 776; python: 337; sh: 51; makefile: 30
file content (17 lines) | stat: -rw-r--r-- 285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// version 20230105
// public domain
// djb

#include <mach/mach_time.h>
#include "cpucycles_internal.h"

long long ticks(void)
{
  return mach_absolute_time();
}

long long ticks_setup(void)
{
  if (!cpucycles_works(ticks)) return cpucycles_SKIP;
  return cpucycles_FINDMULTIPLIER;
}