The other answer is grand if you don't need precision, and is likely more suitable if you want accurate "real" time elapsed over a very long period.
However, if you want your timer to stop during pauses, or re-launches of the game, or you want to mess with Engine.time_scale, or need more precise measurements in relation to in-game events (ie a second's lag in the time might put everything out of sync), then you need to work in relation to Godot's provided delta
:
var time = 0
func _ready():
time = 0
func _process(delta):
time += delta
var seconds = fmod(time,60)
var minutes = fmod(time, 3600) / 60
var str_elapsed = "%02d : %02d" % [minutes, seconds]
print("elapsed : ", str_elapsed)
This has the added benefit of being simpler anyway, and of the resulting 'time' being natively returned as seconds.
If you you want to make calculations in relation to specific physics measurements (eg measuring something's average speed), then you're better off using _physics_process
to add your deltas, as these will happen in sync with physics updates.