Example usage for org.joda.time LocalDateTime plusMillis

List of usage examples for org.joda.time LocalDateTime plusMillis

Introduction

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

Prototype

public LocalDateTime plusMillis(int millis) 

Source Link

Document

Returns a copy of this datetime plus the specified number of millis.

Usage

From source file:eu.trentorise.game.managers.QuartzTaskManager.java

License:Apache License

private Date calculateStartDate(Date initialStart, long period) {
    if (period <= 0) {
        return initialStart;
    }/*from   w w w.  j a  va 2s  .  co m*/
    LocalDateTime start = new LocalDateTime(initialStart);
    while (start.toDateTime().isBeforeNow()) {
        start = start.plusMillis((int) period);
    }

    return start.toDate();
}