Animation Nodes: Trigger Action, Save Value if Frame Matches?
While I think it's possible to dynamically change the values of a node with a script, I assume the better option is to use a Script node to store an ID property, e.g. in the scene. For more complex data types than single float or int values you may have to define a custom bpy.propsproperty.

A script with a boolean for the reset as input and a single float for the time as output should work.



import bpy
scene = bpy.context.scene
frame = float(scene.frame_current)

if reset:
    scene['last_reset'] = frame

time = frame - scene.get('last_reset', 0.0)


N.B.: Interestingly, the ID property is only retained if the frame is manually converted to a float. If the float conversion is removed (frame = scene.current_frame), the property vanishes every time the reset flag is cleared.