eyeglass-timer

1.0.1 • Public • Published

Eyeglass Timer

Allows you to time your Sass code to the nearest millisecond.

To use it in your eyeglass project:

$ npm install --save eyeglass-timer

Then in your Sass file(s):

@import "timer";

$timer: timer-start();

// Do something complicated

/*! Complicated thing took: #{elapsed-time($timer)} */

API

  • current-time-ms() - returns the current time in milliseconds since the epoch.
  • timer-start() - returns the time the timer was started.
  • elapsed-time($start-time) - returns the delta since the timer was started.
  • $timer-imported-at - The time the timer module was first imported.

Caveats

This only times the execution of your Sass file. The Sass parse and CSS generation time, as well as the timing of some Sass directives like @extend will happen outside of the execution phase.

Readme

Keywords

Package Sidebar

Install

npm i eyeglass-timer

Weekly Downloads

2

Version

1.0.1

License

Apache License 2.0

Last publish

Collaborators

  • chriseppstein