congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CalendarPeriod.getValueInMillisecs
Code IndexAdd Tabnine to your IDE (free)

How to use
getValueInMillisecs
method
in
ucar.nc2.time.CalendarPeriod

Best Java code snippets using ucar.nc2.time.CalendarPeriod.getValueInMillisecs (Showing top 4 results out of 315)

origin: Unidata/thredds

public static int getOffset(CalendarDate refDate, CalendarDate cd, CalendarPeriod timeUnit) {
 long msecs = cd.getDifferenceInMsecs(refDate);
 return (int) Math.round(msecs / timeUnit.getValueInMillisecs());
}
origin: Unidata/thredds

/**
 * Get offsets from firstDate, in units of timeUnit
 * @return for each runtime, a list of values from firstdate
 */
public List<Double> getOffsetsInTimeUnits() {
 double start = firstDate.getMillis();
 List<Double> result = new ArrayList<>(runtimes.length);
 for (int idx=0; idx<runtimes.length; idx++) {
  double runtime = (double) getRuntime(idx);
  double msecs = (runtime - start);
  result.add(msecs / timeUnit.getValueInMillisecs());
 }
 return result;
}
origin: Unidata/thredds

public double makeOffsetFromRefDate( CalendarDate date) {
 if (isCalendarField) {
  if (date.equals(baseDate)) return 0.0;
  return date.getDifference(baseDate, periodField);
 } else {
  long msecs = date.getDifferenceInMsecs(baseDate);
  return msecs / period.getValueInMillisecs();
 }
}
origin: Unidata/thredds

double duration = timeUnit.getValueInMillisecs();
for (Object coord : coords) {
 CalendarDate cd = (CalendarDate) coord;
ucar.nc2.timeCalendarPeriodgetValueInMillisecs

Javadoc

Get the duration in milliseconds -+

Popular methods of CalendarPeriod

  • getField
  • getValue
  • of
  • getOffset
  • <init>
  • fromUnitString
    Convert a period string into a CalendarPeriod.Field.
  • getDurationFieldType
  • getPeriodType
  • millisecs
  • equals
  • getConvertFactor
    Get the conversion factor of the other CalendarPeriod to this one
  • multiply
    Multiply the period by an integer
  • getConvertFactor,
  • multiply,
  • toString

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now