Java Code Examples for sun.security.krb5.internal.KerberosTime#now()
The following examples show how to use
sun.security.krb5.internal.KerberosTime#now() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MicroTime.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 2
Source File: MicroTime.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 3
Source File: MicroTime.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 4
Source File: MicroTime.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 5
Source File: MicroTime.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 6
Source File: MicroTime.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 7
Source File: MicroTime.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 8
Source File: MicroTime.java From hottub with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 9
Source File: MicroTime.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 10
Source File: MicroTime.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 11
Source File: MicroTime.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 12
Source File: MicroTime.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }
Example 13
Source File: MicroTime.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { // We count how many different KerberosTime values // can be acquired within one second. KerberosTime t1 = KerberosTime.now(); KerberosTime last = t1; int count = 0; while (true) { KerberosTime t2 = KerberosTime.now(); if (t2.getTime() - t1.getTime() > 1000) break; if (!last.equals(t2)) { last = t2; count++; } } // We believe a nice KerberosTime can at least tell the // difference of 100 musec. if (count < 10000) { throw new Exception("What? only " + (1000000/count) + " musec precision?"); } }