As Marina has already commented:
Времени было очень мало = Было очень мало времени. There was very few time (impersonal sentence).
After quantity words, like много (many, much), мало (a few, not much), несколько (several), достаточно (enough) etc. it's used genitive case. In your example it's "времени" (not "время").