Timing::microTimestamp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace ElegantMedia\PHPToolkit;
4
5
class Timing
6
{
7
	/**
8
	 * Get the micro-timestamp of current time.
9
	 *
10
	 * @return string
11
	 */
12
	public static function microTimestamp()
13 6
	{
14
		// get microtime of file generation to preserve migration sequence
15
		$time = explode(' ', microtime());
16 6
17
		// change the format to 2008_07_14_010813.98232
18
		return date('Y_m_d_His', (int) $time[1]) . '.' . substr((string) $time[0], 2, 5);
19 6
	}
20
}
21