Time functions QBS changes

Signed-off-by: Tanel Dettenborn <dettenbo@cs.helsinki.fi>

Time functions

Signed-off-by: Tanel Dettenborn <dettenbo@cs.helsinki.fi>

Most of time api functions implemented

Fixed logical errors

Signed-off-by: Tanel Dettenborn <dettenbo@cs.helsinki.fi>