# man > TAP::Base

## NAME
    [TAP::Base](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3ABase/markdown) - Base class that provides common functionality to [TAP::Parser](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AParser/markdown) and [TAP::Harness](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AHarness/markdown)

## VERSION
    Version 3.43

## SYNOPSIS
        package [TAP::Whatever](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AWhatever/markdown);

        use base '[TAP::Base](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3ABase/markdown)';

        # ... later ...

        my $thing = [TAP::Whatever](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AWhatever/markdown)->new();

        $thing->callback( event => sub {
            # do something interesting
        } );

## DESCRIPTION
    "[TAP::Base](https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3ABase/markdown)" provides callback management.

## METHODS
### Class Methods
   "callback"
    Install a callback for a named event.

   "get_time"
    Return the current time using [Time::HiRes](https://www.chedong.com/phpMan.php/perldoc/Time%3A%3AHiRes/markdown) if available.

   "time_is_hires"
    Return true if the time returned by get_time is high resolution (i.e. if [Time::HiRes](https://www.chedong.com/phpMan.php/perldoc/Time%3A%3AHiRes/markdown) is
    available).

   "get_times"
    Return array reference of the four-element list of CPU seconds, as with "times" in perlfunc.

