NAME
Time::Spec - a wrapper arount struct timespec
VERSION
version 0.002
SYNOPSIS
my $spec = Time::Spec->new(1.5);
my_sleeper($spec);
say $spec->to_float;
DESCRIPTION
This holds a time specification, broken down into seconds and nanoseconds. This is typically used by XS modules and not by pure-perl ones.
METHODS
new($fractional)
This creates a new Time::Spec
object from a fractional amount of time.
sec()
This returns the number of whole seconds.
nsec()
This returns the fractional part of the time specification in nanoseconds.
to_float()
Convert the time back into fractional seconds.
AUTHOR
Leon Timmermans <fawaka@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2025 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.