def bson_ts_to_long(timestamp):
 return ((timestamp.time << 32) + timestamp.inc)

def bson_ts_to_long ( timestamp ) : return ( ( timestamp . time << 32 ) + timestamp . inc )
convert bson timestamp into integer .