Welcome to the forums @quy_nguyen!
Something like this should work (untested):
var action_timer = 0
func _process(delta):
if (action_timer > 0):
action_timer -= delta
if (action_timer <= 0):
do_action_here()
func start_timer():
action_timer = 0.5 # this will be 0.5 seconds
The example above just shows the relevant bits for the timer, with variables named accordingly. You'll likely want to give them more descriptive names so its easier to understand.
You can also probably use a Timer node, though I personally haven't used them that often so I cannot say right off what code would be needed to make it work.