scripts: time.pl: avoid hard Time::HiRes dependency
authorJo-Philipp Wich <jo@mein.io>
Sun, 5 Aug 2018 10:24:01 +0000 (12:24 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 10:01:55 +0000 (11:01 +0100)
commit2890abbcc0329460ebc7384e994272d1ee3b372d
treedddf7131e8c01872743c8325b7dc533df7606e3d
parentb4454ca4fae13f85e06d01df8a2a94ddd78d3368
scripts: time.pl: avoid hard Time::HiRes dependency

Use Time::HiRes when available and fallback to raw syscall interface
when not. If that fails too, simply report 0, 0 as real time.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from a692e4e3de60e1a10906511fb8ef2d14937d4a19)
scripts/time.pl