Added functionality for handling time; Refactored code for writing counters;

Change-Id: I03ba6e300ab97c6cbec6921713379b94719b6c01
Merge branch 'jb-privacy' of https://github.com/nesl/platform_frameworks_native into jb-privacy