Fixed native timer and added tests.

Native timer was not usable as a source file had the same name as a generated
file, thus being overwritten and not compiled.