Examples of SYSTEMTIME


Examples of ch.agent.t2.time.SystemTime

   * @param domain a non-null time domain
   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of ch.agent.t2.time.SystemTime

    long index = m.asLong() * 24L * 3600000L;
    return index = index - epoch;
  }
 
  private static long dayOrLessToMillisecSinceEpoch (TimeIndex t) throws T2Exception {
    long index = new SystemTime(t.toString()).asLong();
    return index - epoch;
  }
View Full Code Here

Examples of ch.agent.t2.time.SystemTime

    long index = m.asLong() * 24L * 3600000L;
    return index = index - epoch;
  }
 
  private static long dayOrLessToMillisecSinceEpoch (TimeIndex t) throws T2Exception {
    long index = new SystemTime(t.toString()).asLong();
    return index - epoch;
  }
View Full Code Here

Examples of ch.agent.t2.time.SystemTime

   * @param domain a non-null time domain
   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of com.sun.jna.platform.win32.WinBase.SYSTEMTIME

        assertTrue("hr: " + hr.intValue(), hr.intValue() == 0);
    }

    public void testVariantDate() {
        SYSTEMTIME lpSystemTime = new SYSTEMTIME();
        Kernel32.INSTANCE.GetLocalTime(lpSystemTime);

        DoubleByReference pvtime = new DoubleByReference();
        OleAuto.INSTANCE.SystemTimeToVariantTime(lpSystemTime, pvtime);
View Full Code Here

Examples of com.sun.jna.platform.win32.WinBase.SYSTEMTIME

        assertTrue("hr: " + hr.intValue(), hr.intValue() == 0);
    }

    public void testVariantDate() {
        SYSTEMTIME lpSystemTime = new SYSTEMTIME();
        Kernel32.INSTANCE.GetLocalTime(lpSystemTime);

        DoubleByReference pvtime = new DoubleByReference();
        OleAuto.INSTANCE.SystemTimeToVariantTime(lpSystemTime, pvtime);
View Full Code Here

Examples of isi.pasco2.platform.SYSTEMTIME

       * BOOL FileTimeToSystemTime( const FILETIME* lpFileTime, LPSYSTEMTIME
       * lpSystemTime );
       */

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };
      o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      int year = st.wYear.getValue();
      assertTrue(year >= 2006);
View Full Code Here

Examples of isi.pasco2.platform.SYSTEMTIME

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue(lowValue);
      ft.dwHighDateTime.setValue(highValue);

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };

      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
      assertEquals(2006, st.wYear.getValue());
View Full Code Here

Examples of isi.pasco2.platform.SYSTEMTIME

      FILETIME ft = new FILETIME();
      ft.dwLowDateTime.setValue((int) f.getLow());
      ft.dwHighDateTime.setValue((int) f.getHigh());

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };

      //Sat, 30 September 2000 14:46:43
      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
View Full Code Here

Examples of isi.pasco2.platform.SYSTEMTIME

      ft.dwHighDateTime.setValue((int) 0);

      CFunction fileTimeToSystemTime = dll.loadFunction("FileTimeToSystemTime");
      CFunction getFileTimeAsSystemTime = dll.loadFunction("SystemTimeToFileTime");
     
      SYSTEMTIME st = new SYSTEMTIME();
      Object[] ary1 = { ft, st };

      //Sat, 30 September 2000 14:46:43
      Object o = fileTimeToSystemTime.call(CInt.class, ary1,
          CFunction.FUNCFLAG_STDCALL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.