Add explict cast to timeval

- Change implict case from unsigned int to signed long for use in timeval.
- This commit should silence the error/warnings from clangs -Wc++11-narrowing.