It's not clear from the posted code snippet how often timebarcreate() gets called.
If it's called only once then things obviously cannot work as you need to check the button status every frame to catch if it's been pressed or released.
On the other hand if it's called each frame, then things still cannot work because you check if action is released only if action is at the same time pressed. This can never happen.
Although what you want could be achieved by polling the Input singleton, it's much more convenient to use _input() event handler as it will be called only when input events actually happen. Inside the handler you need to determine the type of the event and act accordingly:
extends Popup
var time_start: float
func _input(event):
if event is InputEventAction:
if event.action == "CreateTimerBar":
if event.pressed:
time_start = OS.get_unix_time()
else:
print(OS.get_unix_time() - time_start)