Package io.dapr.utils
Class DurationUtils
java.lang.Object
io.dapr.utils.DurationUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Duration
convertDurationFromDaprFormat
(String valueString) Converts time from the String format used by Dapr into a Duration.static String
Converts a Duration to the format used by the Dapr runtime.
-
Constructor Details
-
DurationUtils
public DurationUtils()
-
-
Method Details
-
convertDurationFromDaprFormat
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
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)
-