It depends on the context.
e.g. I'm having a cup of tea and talking to a friend. 40 minutes later we stop talking. I look at the clock surprised and say 'damn, the time's flown!'.
e.g. I'm talking to a friend who has been studying abroad for 2 years. She's been so busy with studying, working etc that she hasn't had time to think about anything else. I say, 'after so long you must miss your family, right?'. She replies, 'to be honest, I feel like I only left last month. Time has really flown by'.
Mostly, either can be used.