Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Apr 29, 2020
1 parent feb205d commit d568ab9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ setTimeout(() => {
// Benchmark took 1000000552 nanoseconds
}, 1000);
```

or you can use as polyfill:
```
import 'browser-hrtime';
Expand All @@ -58,14 +59,15 @@ setTimeout(() => {
### usage as an Angular polyfill:
add to `src/polyfills.ts`:
`import 'browser-hrtime';`
# UMD
# Use in browser
```
<!DOCTYPE html>
<html>
<head>
<script crossorigin src="https://unpkg.com/browser-hrtime/lib/umd/index.min.js"></script>
<script crossorigin src="https://unpkg.com/browser-hrtime/lib/umd/hrtime.min.js"></script>
<script>
console.log(hrtime());
const first = process.hrtime();
console.log(first);
console.log(process.hrtime(first));
Expand Down

0 comments on commit d568ab9

Please sign in to comment.