using
(
new
CalculateTime
(
"My method"
)
)
{
Thread
.
Sleep
(
5000
)
;
}
//Outputs "My method took 5000 miliseconds to complete." here.