# tic
> Return a high-resolution time.
## Usage
```javascript
var tic = require( '@stdlib/time/tic' );
```
#### tic()
Returns a high-resolution time.
```javascript
var t = tic();
// returns [,]
```
The returned `array` has the following format: `[seconds, nanoseconds]`.
## Notes
- In browser environments, the implementation uses the [`performance.now`][performance-now] API. If the [`performance-now`][performance-now] API is unavailable, the implementation falls back to the [`Date`][date] object.
- In non-browser environments, the implementation uses [`process.hrtime`][process-hrtime].
## Examples
```javascript
var tic = require( '@stdlib/time/tic' );
var toc = require( '@stdlib/time/toc' );
var start = tic();
setTimeout( onTimeout, 2000 );
function onTimeout() {
var elapsed = toc( start );
console.log( 'Elapsed: %d seconds and %d nanoseconds', elapsed[0], elapsed[1] );
}
```
[performance-now]: https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
[date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now
[process-hrtime]: https://nodejs.org/api/process.html#process_process_hrtime_time