t/7time/time_v4.t
raw| 1 | # |
| 2 | # test the time() function. |
| 3 | # |
| 4 | # this really tests the statement that times returned |
| 5 | # from other than v1, v6, and v7 are always 0. |
| 6 | # |
| 7 | use strict; |
| 8 | use warnings; |
| 9 | use MyTest; |
| 10 | use UUID 'generate_v4'; |
| 11 | |
| 12 | ok 1, 'loaded'; |
| 13 | |
| 14 | my $sys_time = time; |
| 15 | |
| 16 | generate_v4(my $u0); |
| 17 | |
| 18 | my $uid_time = UUID::time($u0); |
| 19 | note scalar localtime($uid_time); |
| 20 | |
| 21 | note 'uid time ', $uid_time; |
| 22 | note 'sys time ', $sys_time; |
| 23 | |
| 24 | is $uid_time, 0, 'always 0'; |
| 25 | |
| 26 | done_testing; |