You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
26 lines
675 B
Java
26 lines
675 B
Java
package android.view;
|
|
|
|
public final class Choreographer {
|
|
public static interface FrameCallback {
|
|
public void doFrame(long frametime_in_nanoseconds);
|
|
}
|
|
|
|
public static Choreographer getInstance() {
|
|
return new Choreographer();
|
|
}
|
|
|
|
public void postFrameCallback(Choreographer.FrameCallback callback) {
|
|
postFrameCallbackDelayed(callback, 0);
|
|
}
|
|
|
|
public void postFrameCallbackDelayed(final Choreographer.FrameCallback callback, long delayMillis) {
|
|
// TODO - do the delay part
|
|
// NOTE: if we do this synchronously, it gets stuck
|
|
Thread async = new Thread(new Runnable() {
|
|
public void run() {
|
|
callback.doFrame(System.nanoTime());
|
|
} });
|
|
async.start();
|
|
}
|
|
}
|