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
src/api-impl: fix up code style, mainly for code imported from AOSP
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package android.os;
|
||||
|
||||
|
||||
/**
|
||||
* Core timekeeping facilities.
|
||||
*
|
||||
@@ -89,24 +88,23 @@ package android.os;
|
||||
* </ul>
|
||||
*/
|
||||
public final class SystemClock {
|
||||
/**
|
||||
* This class is uninstantiable.
|
||||
*/
|
||||
private SystemClock() {
|
||||
// This space intentionally left blank.
|
||||
}
|
||||
/**
|
||||
* This class is uninstantiable.
|
||||
*/
|
||||
private SystemClock() {
|
||||
// This space intentionally left blank.
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits a given number of milliseconds (of uptimeMillis) before returning.
|
||||
* Similar to {@link java.lang.Thread#sleep(long)}, but does not throw
|
||||
* {@link InterruptedException}; {@link Thread#interrupt()} events are
|
||||
* deferred until the next interruptible operation. Does not return until
|
||||
* at least the specified number of milliseconds has elapsed.
|
||||
*
|
||||
* @param ms to sleep before returning, in milliseconds of uptime.
|
||||
*/
|
||||
public static void sleep(long ms)
|
||||
{
|
||||
/**
|
||||
* Waits a given number of milliseconds (of uptimeMillis) before returning.
|
||||
* Similar to {@link java.lang.Thread#sleep(long)}, but does not throw
|
||||
* {@link InterruptedException}; {@link Thread#interrupt()} events are
|
||||
* deferred until the next interruptible operation. Does not return until
|
||||
* at least the specified number of milliseconds has elapsed.
|
||||
*
|
||||
* @param ms to sleep before returning, in milliseconds of uptime.
|
||||
*/
|
||||
public static void sleep(long ms) {
|
||||
System.out.println("!!! sleep(...) doesn't work, need to implement uptimeMillis");
|
||||
/*
|
||||
long start = uptimeMillis();
|
||||
@@ -129,60 +127,60 @@ public final class SystemClock {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
*/}
|
||||
|
||||
/**
|
||||
* Sets the current wall time, in milliseconds. Requires the calling
|
||||
* process to have appropriate permissions.
|
||||
*
|
||||
* @return if the clock was successfully set to the specified time.
|
||||
*/
|
||||
native public static boolean setCurrentTimeMillis(long millis);
|
||||
|
||||
/**
|
||||
* Returns milliseconds since boot, not counting time spent in deep sleep.
|
||||
*
|
||||
* @return milliseconds of non-sleep uptime since boot.
|
||||
*/
|
||||
/*native */public static long uptimeMillis() {
|
||||
/**
|
||||
* Sets the current wall time, in milliseconds. Requires the calling
|
||||
* process to have appropriate permissions.
|
||||
*
|
||||
* @return if the clock was successfully set to the specified time.
|
||||
*/
|
||||
native public static boolean setCurrentTimeMillis(long millis);
|
||||
|
||||
/**
|
||||
* Returns milliseconds since boot, not counting time spent in deep sleep.
|
||||
*
|
||||
* @return milliseconds of non-sleep uptime since boot.
|
||||
*/
|
||||
/*native */ public static long uptimeMillis() {
|
||||
return 654000; // FIXME
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns milliseconds since boot, including time spent in sleep.
|
||||
*
|
||||
* @return elapsed milliseconds since boot.
|
||||
*/
|
||||
native public static long elapsedRealtime();
|
||||
/**
|
||||
* Returns milliseconds since boot, including time spent in sleep.
|
||||
*
|
||||
* @return elapsed milliseconds since boot.
|
||||
*/
|
||||
native public static long elapsedRealtime();
|
||||
|
||||
/**
|
||||
* Returns nanoseconds since boot, including time spent in sleep.
|
||||
*
|
||||
* @return elapsed nanoseconds since boot.
|
||||
*/
|
||||
public static native long elapsedRealtimeNanos();
|
||||
/**
|
||||
* Returns nanoseconds since boot, including time spent in sleep.
|
||||
*
|
||||
* @return elapsed nanoseconds since boot.
|
||||
*/
|
||||
public static native long elapsedRealtimeNanos();
|
||||
|
||||
/**
|
||||
* Returns milliseconds running in the current thread.
|
||||
*
|
||||
* @return elapsed milliseconds in the thread
|
||||
*/
|
||||
public static native long currentThreadTimeMillis();
|
||||
/**
|
||||
* Returns milliseconds running in the current thread.
|
||||
*
|
||||
* @return elapsed milliseconds in the thread
|
||||
*/
|
||||
public static native long currentThreadTimeMillis();
|
||||
|
||||
/**
|
||||
* Returns microseconds running in the current thread.
|
||||
*
|
||||
* @return elapsed microseconds in the thread
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native long currentThreadTimeMicro();
|
||||
/**
|
||||
* Returns microseconds running in the current thread.
|
||||
*
|
||||
* @return elapsed microseconds in the thread
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native long currentThreadTimeMicro();
|
||||
|
||||
/**
|
||||
* Returns current wall time in microseconds.
|
||||
*
|
||||
* @return elapsed microseconds in wall time
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native long currentTimeMicro();
|
||||
/**
|
||||
* Returns current wall time in microseconds.
|
||||
*
|
||||
* @return elapsed microseconds in wall time
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static native long currentTimeMicro();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user