In Harry Potter fanfic, it is relatively established fanon that timekeeping is done using the Tempus charm, which displays the current time in the air.
As answered in How do people at Hogwarts usually tell the time?, this charm is never mentioned in the books -- instead, normal clocks and watches are used. That doesn't mean it's impossible for magic to tell time, however, just that it's not in general use.
In the somewhat-expanded canon that includes the books, the movies, Pottermore, and "authoritative" tweets by Rowling, is there any reference to any spell used for timekeeping?