#Timer
struct Timer : Printable {
let start = NSDate()
let name: String
var description: String {
let now = NSDate()
let dif = now.timeIntervalSince1970 - start.timeIntervalSince1970
let roundedDif = Double(round(1000 * dif)/1000)
return "\(name) : \(roundedDif)"
}
}
#Usage
let timer = Timer(name: "Some Thing I'm Timing")
// Do stuff I'm curious about.
println(timer)