Skip to main content
The Convex Rate Limiter exports helpful time constants to make rate limit configurations more readable.

Time Constants

All time constants are in milliseconds.

SECOND

Represents one second (1,000 milliseconds). Example:

MINUTE

Represents one minute (60,000 milliseconds). Value: 60000 Example:

HOUR

Represents one hour (3,600,000 milliseconds). Value: 3600000 Example:

DAY

Represents one day (86,400,000 milliseconds). Value: 86400000 Example:

WEEK

Represents one week (604,800,000 milliseconds). Value: 604800000 Example:

Usage in Rate Limits

These constants make rate limit configurations more readable and maintainable:

Combining Constants

You can combine or multiply constants for custom periods:
All time constants are in milliseconds to match JavaScript’s Date.now() and Convex’s time units.