Name

SPVM::Time::HiRes - High Resolution Time

Description

The Time::HiRes class in SPVM has methods to manipulate high resolution time.

Usage

use Time::HiRes;

Class Methods

gettimeofday

static method gettimeofday : Sys::Time::Timeval ();

usleep

static method usleep : int ($usec : int);

nanosleep

static method nanosleep : long ($nanoseconds : long);

tv_interval

static method tv_interval : double ($a : Sys::Time::Timeval, $b : Sys::Time::Timeval = undef);

time

static method time : double ();

Exceptions:

This method throws the following exception. This method is not implemented because it's clear that the lack of precision will cause future bugs.

sleep

static method sleep : double ($float_seconds : double);

alarm

static method alarm : double ($float_seconds : double, $interval_float_seconds : double = 0);

setitimer

static method setitimer : Time::HiRes::ItimervalFloat ($which : int, $new_itimer_float : Time::HiRes::ItimervalFloat);

getitimer

static method getitimer : Time::HiRes::ItimervalFloat ($which : int);

clock_gettime

static method clock_gettime : double ($clk_id : int);

clock_getres

static method clock_getres : double ($clk_id : int);

clock_nanosleep

static method clock_nanosleep : long ($clockid : int, $nanoseconds : long, $flags : int = 0);

clock

static method clock : long ();

Repository

SPVM::Time::HiRes - Github

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License