#include <mach/clock.h> not included by <mach/mach.h> — include it explicitly

mach/clock.h

3 macros · 3 functions

macro_clock_user_

#define _clock_user_ 

macroclock_MSG_COUNT

#define clock_MSG_COUNT 3

functionclock_get_time

extern kern_return_t clock_get_time(
	clock_serv_t clock_serv,
	mach_timespec_t *cur_time /* out */
)
References to clock objects are returned by: host_get_clock_service(host_t,...) host_get_clock_control(host_priv_t,...) - Priviledged subclass Get the clock time. Available to all.
MIG routine from mach/clock.defs
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Return the current time.
The clock_get_time function returns the current time kept by a clock. The value returned is a monotonically increasing value (unless tampered with via the clock_set_time function).

functionclock_get_attributes

extern kern_return_t clock_get_attributes(
	clock_serv_t clock_serv,
	clock_flavor_t flavor,
	clock_attr_t clock_attr, /* out */
	mach_msg_type_number_t *clock_attrCnt
)
Get clock attributes. Available to all.
MIG routine from mach/clock.defs
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Return attributes of a clock.
The clock_get_attributes function returns attributes of a clock's implementation or operation.

functionclock_alarm

extern kern_return_t clock_alarm(
	clock_serv_t clock_serv,
	alarm_type_t alarm_type,
	mach_timespec_t alarm_time,
	clock_reply_t alarm_port
)
Setup a clock alarm. Available to all.
MIG routine from mach/clock.defs
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Set off an alarm.
The clock_alarm function requests that a clock send an alarm message to a specified port at a given future time. The alarm message is specified by the clock_alarm_reply server interface.
Notes. If the specified alarm time is in the past, the alarm message is sent immediately and time-stamped with the current time. Otherwise, the alarm is queued and delivered at the specified alarm time and time-stamped at that time. The alarm will be serviced at the service time nearest the specified alarm time as governed by the current clock alarm resolution. Not all clocks implement this service, but the REALTIME clock must. If the clock does not provide this service, this call is ignored.

macrosubsystem_to_name_map_clock

#define subsystem_to_name_map_clock { "clock_get_time", 1000 },
    { "clock_get_attributes", 1001 },
    { "clock_alarm", 1002 }