cast the ticks for timespan to an int. fixes #1