import time


def minutesTillBus(busTimepoint, nowTime = None):
	""" given a bus timepoint record from getTimepointDepartures, return the number of minutes until that bus, as a float.  nowTime is the current time since unix epoch, but leave it out to just use the system time. """
	t = busTimepoint["DepartureTime"]
	if nowTime is None: nowTime = time.time()
	secondsFromNow = float(t[6:-2].split('-')[0])/1000.0 - nowTime
	return secondsFromNow / 60.0