Fix some obvious type warnings.
Store timer hook's timeout as milliseconds.
Always use 64-bit file offset and size.