Sha256: 7cc38649cc9dd5b6246175203ed75f387488dd9ef00c02210bb87b8cee06e9a0

Contents?: true

Size: 688 Bytes

Versions: 7

Compression:

Stored size: 688 Bytes

Contents

#pragma once

#include <stdbool.h>
#include <time.h>
#include <ruby.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);

// 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

7 entries across 7 versions & 1 rubygems

Version Path
datadog-2.8.0 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.7.1 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.7.0 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.6.0 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.5.0 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.4.0 ext/datadog_profiling_native_extension/clock_id.h
datadog-2.3.0 ext/datadog_profiling_native_extension/clock_id.h