src/counters/Timer.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 16
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 9
mnd 0
bc 0
fnc 3
dl 0
loc 16
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

3 Functions

Rating   Name   Duplication   Size   Complexity  
A Timer.diff 0 3 1
A Timer.bench 0 3 1
A Timer.prettify 0 3 1
1
import { formatTime } from '../utils/formatters';
2
import Counter from './Counter';
3
4
export default class Timer extends Counter {
5
    bench() {
6
        return new Date();
7
    }
8
9
    static prettify(data) {
10
        return formatTime(data);
11
    }
12
13
    diff(start, end) {
14
        return end - start;
15
    }
16
}
17