Package io.dapr.utils

# Class DurationUtils

java.lang.Object
io.dapr.utils.DurationUtils

    public class DurationUtils
    extends java.lang.Object

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `DurationUtils()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static java.time.Duration` | `convertDurationFromDaprFormat​(java.lang.String valueString)` | Converts time from the String format used by Dapr into a Duration.
  `static java.lang.String` | `convertDurationToDaprFormat​(java.time.Duration value)` | Converts a Duration to the format used by the Dapr runtime.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DurationUtils

    public DurationUtils()

- ## Method Details

  - ### convertDurationFromDaprFormat

    public static java.time.Duration convertDurationFromDaprFormat​(java.lang.String valueString)
    Converts time from the String format used by Dapr into a Duration.
    Parameters:
      `valueString` - A String representing time in the Dapr runtime's format (e.g. 4h15m50s60ms).
    Returns:
      A Duration

  - ### convertDurationToDaprFormat

    public static java.lang.String convertDurationToDaprFormat​(java.time.Duration value)
    Converts a Duration to the format used by the Dapr runtime.
    Parameters:
      `value` - Duration
    Returns:
      The Duration formatted as a String in the format the Dapr runtime uses (e.g. 4h15m50s60ms)