Use a clock to get the time for metrics
Use a clock instance for fileMetrics as well
Merge pull request #249 from dmuino/clockMetrics

Use a clock to get the time for metrics