fix call to undeclared function time on windows