Timing framework improvement

@nkogteva please, review.
Minor style issue: we prefer constants to be on the left of ==.  I know it feels unnatural, but it's defensive programming -- the compiler will fail to compile if you typo like this "if (NULL = fname) ...".