Lines Matching refs:timeToCode
15 import {TimeSpan, timeToCode} from './time';
18 expect(timeToCode(3)).toEqual('3s');
19 expect(timeToCode(60)).toEqual('1m');
20 expect(timeToCode(63)).toEqual('1m 3s');
21 expect(timeToCode(63.2)).toEqual('1m 3s 200ms');
22 expect(timeToCode(63.2221)).toEqual('1m 3s 222ms 100us');
23 expect(timeToCode(63.2221111)).toEqual('1m 3s 222ms 111us 100ns');
24 expect(timeToCode(0.2221111)).toEqual('222ms 111us 100ns');
25 expect(timeToCode(0.000001)).toEqual('1us');
26 expect(timeToCode(0.000003)).toEqual('3us');
27 expect(timeToCode(1.000001)).toEqual('1s 1us');
28 expect(timeToCode(200.00000003)).toEqual('3m 20s 30ns');
29 expect(timeToCode(0)).toEqual('0s');