C.77 StopwatchTask
Prev | Appendix C. Optional tasks | Next

## C.77 StopwatchTask

The StopwatchTask provides an easy way to measure execution time of phing tasks.

Table C.106: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`name` | `String` | Name of the timer. |  | Yes
`category` | `String` | Set a category for the timer. |  | No
`action` | `String` | Action could be one of start, stop or lap | start | No

### C.77.1 Example

    <stopwatch name="test" />
    <!-- some other task... -->
    <stopwatch name="test" action="lap" />
    <!-- some other task... -->
    <stopwatch name="test" action="lap" />
    <!-- some other task... -->
    <stopwatch name="test" action="lap" />
    <!-- some other task... -->
    <stopwatch name="test" action="stop" />

Prev | Up | Next
C.76 SvnSwitchTask | Home | C.78 SymfonyConsoleTask