RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
MathSharedStore.java
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
package
org.wpilib.math.util;
6
7
import
org.wpilib.util.WPIUtilJNI;
8
10
public
final
class
MathSharedStore {
11
private
static
MathShared
mathShared;
12
13
private
MathSharedStore() {}
14
20
public
static
synchronized
MathShared
getMathShared
() {
21
if
(mathShared ==
null
) {
22
mathShared =
23
new
MathShared
() {
24
@Override
25
public
void
reportError
(String error, StackTraceElement[] stackTrace) {}
26
27
@Override
28
public
double
getTimestamp
() {
29
return
WPIUtilJNI
.now() * 1.0e-9;
30
}
31
};
32
}
33
return
mathShared;
34
}
35
41
public
static
synchronized
void
setMathShared
(
MathShared
shared) {
42
mathShared = shared;
43
}
44
51
public
static
void
reportError
(String error, StackTraceElement[] stackTrace) {
52
getMathShared
().
reportError
(error, stackTrace);
53
}
54
60
public
static
double
getTimestamp
() {
61
return
getMathShared
().
getTimestamp
();
62
}
63
}
org.wpilib.math.util.MathSharedStore.reportError
static void reportError(String error, StackTraceElement[] stackTrace)
Definition
MathSharedStore.java:51
org.wpilib.math.util.MathSharedStore.getMathShared
static synchronized MathShared getMathShared()
Definition
MathSharedStore.java:20
org.wpilib.math.util.MathSharedStore.getTimestamp
static double getTimestamp()
Definition
MathSharedStore.java:60
org.wpilib.math.util.MathSharedStore.setMathShared
static synchronized void setMathShared(MathShared shared)
Definition
MathSharedStore.java:41
org.wpilib.util.WPIUtilJNI
Definition
WPIUtilJNI.java:17
org.wpilib.math.util.MathShared
Definition
MathShared.java:8
org.wpilib.math.util.MathShared.reportError
void reportError(String error, StackTraceElement[] stackTrace)
org.wpilib.math.util.MathShared.getTimestamp
double getTimestamp()
org
wpilib
math
util
MathSharedStore.java
Generated by
1.18.0