--- title: "Time Since Last | Darwinium" slug: "time-since-last" description: "Configure Darwinium Time Since Last features to measure elapsed time since selected attributes last appeared in a matching event." tags: ["Feature"] updated: 2026-09-15T12:53:08Z published: 2026-09-15T12:53:08Z canonical: "docs.darwinium.com/time-since-last" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.darwinium.com/llms.txt > Use this file to discover all available pages before exploring further. # Time Since Last ## Find The: Time Since Last ![Image](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/time-since-last_icon.png?sv=2026-02-06&spr=https&st=2026-11-22T23%3A46%3A49Z&se=2026-11-23T00%3A46%3A49Z&sr=b&sp=r&sig=nyjo4rp0Pv1FkZwOnwP3zpZ5hmoNQ5MgZpQhNudYYFM%3D) `time_since_last` The time elapsed since the selected attribute(s) were last seen in an event, in other words the most recent interaction, in milliseconds for compatibility with the other time Features. **For example:** - Where authentication lasts for weeks or months, knowing how long the user has been logged in. The longer an authenticated session has been established, the greater the potential for an account takeover. - Green-lighting users who have recently authenticated, and treating users logged in for weeks or months with greater scrutiny. ## Configuration - [Feature Name](/docs/new-features#feature-name): The "dictionary" name under which the feature value will be stored and referenced by in rules. - [For Events](/docs/new-features#for-events): - [With The Same](/docs/new-features#with-the-same): Provides a way of filtering past events based on the attribute values. There must be at least one Identifier and only Identifier and Subject attributes can be used. ## Optional Configuration - [Default Value](/docs/new-features#default-value): A value that can be assigned to the feature if the attributes to calculate the features are not present. - [Scope](/docs/new-features#scope): Can be used to extend the event search from the local node, to all nodes within the same organization all the way to all across customers (global). - [For Events](/docs/new-features#for-events): - All event types: Default, no filter - Same as current: Filter by event_type of event being processed - Specific event type: List out the `event_type` to restrict to, as a list. Example: only consider `account_login_success`. - [Condition](/docs/new-features#condition): A Query-Language filter that can be used to refine Features for specific use cases. - [Time Window](/docs/new-features#time-window): Can be used to limit the Feature calculation to a specific time period/window. e.g 1 week. Default is `all` ; no time window - [Starting](/docs/new-features#starting): Can be used to remove recent events from Feature calculation. Default is `immediately` ; no lag. **How Time Since Last is calculated** Configured for `account_login_success` events, it finds the most recent matching event and returns the time from there to this one. A more recent event of another type is skipped. ![Time Since Last measures from the most recent matching event to this one](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/time-since-last_diagram.png?sv=2026-02-06&spr=https&st=2026-11-22T23%3A46%3A49Z&se=2026-11-23T00%3A46%3A49Z&sr=b&sp=r&sig=CgJrkJggCMNdn3KgFiZxJTtaGUy6iyucoyFow%2FjRuqU%3D) Include Current Event makes this 0 This event is itself the most recent match, so turning Include Current Event on returns 0 every time. Leave it off for a Time Since Last Feature. ## Use Case 1 Identify if device logging into customer now last did so over a month ago #### Using the Feature in Rules and Investigations Device logging into account *has* logged in before but over a month ago. Time features return in **milliseconds**. ``` feature('dev_acc_session_age') > 1000 * 60 * 60 * 24 * 30 ``` (time features return in milliseconds) #### **Implementing In The Feature Editor** ![image.png](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/image%2842%29.png?sv=2026-02-06&spr=https&st=2026-11-22T23%3A46%3A49Z&se=2026-11-23T00%3A46%3A49Z&sr=b&sp=r&sig=urP7BFdvD9qx3rUo%2FAY6fxjinFrOaZzTAnxR2t%2B7EIw%3D) ![image.png](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/image%2841%29.png?sv=2026-02-06&spr=https&st=2026-11-22T23%3A46%3A49Z&se=2026-11-23T00%3A46%3A49Z&sr=b&sp=r&sig=EubKzKvPidELnamezx8NVgdfBPuakZsWDSXYnnuCyY4%3D) ``` - name: dev_acc_session_age default_value: 0 time_window: all starting: immediately find_the: time_since_last: events: event_type: - account_login_success include_current_event: false with_the_same: - device_signature['VER_1'].identifier - identity['ACCOUNT'].customer_token.customer_token with_scope: same_node_instance ```