Name
SPVM::Sys::Time::Timespec - struct timespec in C language
Usage
use Sys::Time::Timespec;
my $tv = Sys::Time::Timespec->new;
my $tv_sec = $tv->tv_sec;
$tv->set_tv_sec(12);
my $tv_nsec = $tv->tv_nsec;
$tv->set_tv_nsec(34);
Description
Sys::Time::Timespec
represents struct timespec
in C language
.
See gettimeofday(2) - Linux man page about struct timespec
in Linux.
Class Methods
new
static method new : Sys::Time::Timespec ()
Creates a new Sys::Time::Timespec
object.
my $tv = Sys::Time::Timespec->new;
Instance Methods
DESTROY
native method DESTROY : void ();
The destructor.
tv_sec
method tv_sec : long ()
Gets tv_sec
.
my $tv_sec = $tv->tv_sec;
set_tv_sec
method set_tv_sec : void ($tv_sec : long)
Sets tv_sec
.
$tv->set_tv_sec(12);
tv_nsec
method tv_nsec : long ()
Gets tv_nsec
.
my $tv_nsec = $tv->tv_nsec;
set_tv_nsec
method set_tv_nsec : void ($tv_nsec : long)
Sets tv_nsec
.
$tv->set_tv_nsec(34);