alphagov/spotlight — pull request #118 by alexmuller (2013-12-31 12:27:56+00:00)
Title: Display page load time in seconds

Change `formatDuration` method to use a given unit.

Previously we relied on the visual length (number of characters) of a string to determine what unit it was output as. I think we should be able to specify the unit (milliseconds or seconds) in the method signature.

Allows formatting to a given number of significant figures.