Time::Beat - Module to convert from standard time to swatch 'beat' time.
use Time::Beat qw ( beattime );
my $time_in_beats = beattime(time());
Time::Beat is a module to provide you with the time in beats. It takes a time() formatted string, and outputs the time in beats. The basic algorithm for doing this is to take time in GMT+1 hour, convert it into seconds, and divide by 86.4. Hopefully I'll get it converting backwards at some point.
Time::Beat
time()
beattime is the one and only function in Time::Beat. It will give you the current time in beats if you do not specify a time string. If you specify a time string it will return that particular time in beats.
beattime
If gmtime.hours == 23 before then problems were caused because the hour became 24 - it should have been 0. The problem has now been fixed.
James A. Duncan <j@mesduncan.co.uk>
perl(1)
To install Time::Beat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Time::Beat
CPAN shell
perl -MCPAN -e shell install Time::Beat
For more information on module installation, please visit the detailed CPAN module installation guide.