co_div64() is inaccurate. For example,
co_div64(0x100000000,0x10000000) returns 15 instead of 16.
co_div64(0x1000000000000,0x10000000) returns 983055 instead of 1048576.
As an alternative, I suggest using http://www.linuxhq.com/kernel/v2.5/75/lib/div64.c that returns both the result and the remainder, both needed in time calculation. Another option is to use Windows native divide operator. Why do we need to implement it if it already exists?