Implemented some cross platform timer

Change-Id: I14ae5ce46f8c6f0b1ed1d772bef2e75f70b3bcb8