TimeProvider

interface TimeProvider(source)

Provides platform-independent access to time-related functionality for the memory system. This interface enables consistent timestamp generation across different platforms while allowing platform-specific optimizations.

Use cases:

  • Generating timestamps for memory chunks and facts

  • Implementing time-based memory retrieval and cleanup

  • Supporting temporal reasoning in the memory system

  • Enabling platform-specific time handling optimizations

The interface is designed to be simple yet flexible enough to accommodate different platform requirements and time precision needs.

Inheritors

Functions

Link copied to clipboard
abstract fun getCurrentTimestamp(): Long

Retrieves the current timestamp in milliseconds. This method is used throughout the memory system to: