GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::MockTime::HiRes(3) User Contributed Perl Documentation Test::MockTime::HiRes(3)

Test::MockTime::HiRes - Replaces actual time with simulated high resolution time

    use Test::MockTime::HiRes qw(mock_time);

    my $now = time;
    mock_time {
        time;    # == $now;

        sleep 3; # returns immediately

        time;    # == $now + 3;

        usleep $microsecond;
    } $now;

"Test::MockTime::HiRes" is a Time::HiRes compatible version of Test::MockTime. You can wait milliseconds in simulated time.

It also provides "mock_time" to restrict the effect of the simulation in a code block.

Test::MockTime

Time::HiRes

Copyright (C) INA Lintaro

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

INA Lintaro <tarao.gnn@gmail.com>
2018-02-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.