Sha256: f1379b6a5891afe102f0d5a38cfd8f4a0c27a7c4d0b1282a03a320500b24d19a
Contents?: true
Size: 779 Bytes
Versions: 15
Compression:
Stored size: 779 Bytes
Contents
#pragma once #include <stdbool.h> #include <time.h> // Contains the operating-system specific identifier needed to fetch CPU-time, and a flag to indicate if we failed to fetch it typedef struct thread_cpu_time_id { bool valid; clockid_t clock_id; } thread_cpu_time_id; // Contains the current cpu time, and a flag to indicate if we failed to fetch it typedef struct thread_cpu_time { bool valid; long result_ns; } thread_cpu_time; void self_test_clock_id(void); // TODO: Remove this after the OldStack profiler gets removed VALUE clock_id_for(VALUE self, VALUE thread); // Safety: This function is assumed never to raise exceptions by callers thread_cpu_time_id thread_cpu_time_id_for(VALUE thread); thread_cpu_time thread_cpu_time_for(thread_cpu_time_id time_id);
Version data entries
15 entries across 15 versions & 1 rubygems