Added type casts to calucation of atime and mtime

Like it was suggested by @aktau