Example usage for org.joda.time Duration Duration

List of usage examples for org.joda.time Duration Duration

Introduction

In this page you can find the example usage for org.joda.time Duration Duration.

Prototype

public Duration(Object duration) 

Source Link

Document

Creates a duration from the specified object using the org.joda.time.convert.ConverterManager ConverterManager .

Usage

From source file:org.phenotips.jodatime.script.JodaTimeScriptService.java

License:Open Source License

/**
 * Get a duration object equal to the specified number of milliseconds.
 *
 * @param millis the number of milliseconds to represent, both positive and negative values are accepted
 * @return the requested duration/*www  .j a  v a 2  s. co m*/
 * @see org.joda.time.Duration#Duration(long)
 */
public Duration getDuration(long millis) {
    return new Duration(millis);
}