DiviArea.Utils.toMilliseconds()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.Utils.toMilliseconds()
DiviArea.Utils.toMilliseconds(value)

Converts a CSS timing value into a numeric value that represents the millisecond duration.

E.g. “1000ms” = 1000, “1.25s” = 1250

Params

value
(string, required) The CSS timing value to convert. Supported units are “s” and “ms”

Returns

An integer value that represents the duration in milliseconds, or 0 if the input value could not be converted.

Notes

No notes

Was this article helpful?

Related Articles