Package org.joda.time

Examples of org.joda.time.Duration


    }

    private void insert24HourData(int numSchedules, DateTime endTime) {
        log.info("Inserting 24 hour data");
        DateTime startTime = endTime.minusDays(365);
        Duration duration = Days.ONE.toStandardDuration();

        insertData(numSchedules, startTime, endTime, duration, insert24HourData);
    }
View Full Code Here


                sunriseTime =
                        sunriseTime.plusDays(1);
            }
        }

        toSunset = sunsetTime.isAfter(ref) ? new Duration(ref, sunsetTime) : new Duration(sunsetTime, ref);
        toSunrise = sunriseTime.isAfter(ref) ? new Duration(ref, sunriseTime) : new Duration(sunriseTime, ref);

        // genera evento:
        GenericEvent ev = new GenericEvent(getClass());
        ev.setDestination("app.event.sensor.calendar.event.twilight");
       
View Full Code Here

        }

        public void add(PingPongActivity pingPongActivityDataObject) {

            // This is the reply to a ping the local user sent himself
            Duration rtt = pingPongActivityDataObject.getRoundtripTime();

            lastSeen = new DateTime();

            sessionAverage = sessionAverage.plus(rtt);
View Full Code Here

                + pingsSent
                + " ("
                + String.format("%.1f", getPingSuccessPercentage())
                + "%)"
                + (lastSeen != null ? " - last seen: "
                    + new Duration(lastSeen, new DateTime()).getMillis()
                    + "ms ago" : "");
        }
View Full Code Here

    protected void processGatheredData() {
        data.setSessionID(currentSessionID);
        data.setLocalSessionStartTime(localSessionStart);
        data.setLocalSessionEndTime(localSessionEnd);
        data.setLocalSessionDuration(StatisticManager
            .getTimeInMinutes(new Duration(localSessionStart, localSessionEnd)
                .getMillis()));
        data.setSessionCount(statisticManager.getSessionCount());
        data.setIsHost(isHost);

        if (statisticManager.isPseudonymSubmissionAllowed()) {
View Full Code Here

        this.initiator = initiator;
        this.departureTime = departureTime;
    }

    public Duration getRoundtripTime() {
        return new Duration(departureTime, new DateTime());
    }
View Full Code Here

        this.initiator = initiator;
        this.departureTime = departureTime;
    }

    public Duration getRoundtripTime() {
        return new Duration(departureTime, new DateTime());
    }
View Full Code Here

  }

  @Override
  protected IFileData createDataNode(LocalDate date, WorkspaceStorage ws,
      FileEventType type) throws Exception {
    return new FileData(date, ws, new Duration(type.getDuration()),
        workspaceRoot().getFile(new Path(type.getFilePath())));
  }
View Full Code Here

  }

  @Override
  protected IJavaData createDataNode(LocalDate date, WorkspaceStorage ws,
      JavaEventType type) throws Exception {
    Duration duration = new Duration(type.getDuration());
    IJavaElement element = JavaCore.create(type.getHandleIdentifier());
    return new JavaData(date, ws, duration, element);
  }
View Full Code Here

  }

  @Override
  protected IPartData createDataNode(LocalDate date, WorkspaceStorage ws,
      PartEventType t) throws Exception {
    return new PartData(date, ws, new Duration(t.getDuration()), t.getPartId());
  }
View Full Code Here

TOP

Related Classes of org.joda.time.Duration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.