 	}
 }
 
-func benchmark(precision: String = "ms", _ call: () -> ()) -> Int
+/**
+	Measure execution time of trailing closure.
+
+	- Parameter precision: Precision of measurement. Possible
+	values:
+		- "ns": nanoseconds
+		- "us": microseconds
+		- "ms" or omitted parameter: milliseconds
+		- "s" or invalid input: seconds
+*/
+public func benchmark(_ precision: String = "ms", _ call: () -> ()) -> Int
 {
 	// empty call duration to subtract
-	let emptyCallNano = performanceInNs({})
-	let elapsedNano = performanceInNs(call)
+	let emptyCallNano = durationNS({})
+	let elapsedNano = durationNS(call)
 
 	let elapsedCorrected = elapsedNano < emptyCallNano ? 0 : elapsedNano - emptyCallNano
 
 	return adjustPrecision(elapsedCorrected, toPrecision: precision)
 }
 
-func benchmarkPrint(precision: String = "ms", title: String, _ call: () -> ())
+/**
+	Measure execution time of trailing closure, and print result
+	with description into the console.
+
+	- Parameter precision: Precision of measurement. Possible
+	values:
+		- "ns": nanoseconds
+		- "us": microseconds
+		- "ms" or omitted parameter: milliseconds
+		- "s" or invalid input: seconds
+
+	- Parameter title: Description of benchmark.
+*/
+public func benchmarkPrint(_ precision: String = "ms", title: String, _ call: () -> ())
 {
 	print(title + ": \(benchmark(precision, call))" + precision)
 }
 
-func benchmarkAvg(precision: String = "ms",
+
+/**
+	Measure the average execution time of trailing closure.
+
+	- Parameter precision: Precision of measurement. Possible
+	values:
+		- "ns": nanoseconds
+		- "us": microseconds
+		- "ms" or omitted parameter: milliseconds
+		- "s" or invalid input: seconds
+
+	- Parameter title: Description of benchmark.
+
+	- Parameter times: Amount of executions.
+	Default when parameter is omitted: 100.
+
+	- Returns: Minimum, Average and Maximum execution time of
+	benchmarks as 3-tuple.
+*/
+public func benchmarkAvg(
+	_ precision: String = "ms",
 	title: String = "",
-	times: Int = 100,
-	_ call: () -> ()) -> (min: Int, avg: Int, max: Int)
+	times: Int = 10,
+	_ call: () -> ())
+	-> (min: Int, avg: Int, max: Int)
 {
-	let emptyCallsNano = performanceInNs(
+	let emptyCallsNano = durationNS(
 	{
 		for _ in 0..<times {}
 	})

	return elapsedNano
}

private func adjustPrecision(ns: Int, toPrecision: String) -> Int
{
	switch toPrecision
	{


	for _ in 0..<times
	{
		let duration = durationNS(call)

		if duration < min { min = duration }
		if duration > max { max = duration }

		elapsedNanoCombined += duration
	}
