def get_timeslice(slice_seconds):
 now = int(time.time())
 slice_count = (now // slice_seconds)
 slice_start = int((slice_count * slice_seconds))
 slice_end = (slice_start + slice_seconds)
 return TimeSlice(slice_start, slice_end)

def get_timeslice ( slice_seconds ) : now = int ( time . time ( ) ) slice_count = ( now // slice_seconds ) slice_start = int ( ( slice_count * slice_seconds ) ) slice_end = ( slice_start + slice_seconds ) return TimeSlice ( slice_start , slice_end )
return tuple describing the current slice given slice width .