@@ -0,0 +1,2038 @@
+package org.nativescript;%0A%0Aimport android.os.SystemClock;%0Aimport android.util.Log;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.FileReader;%0A%0A/**%0A * Created by cankov on 15/05/2017.%0A */%0Apublic class Process %7B%0A    static long startTime = -1;%0A%0A    public static long getStartTime() %7B%0A        if (startTime != -1) %7B%0A            return startTime;%0A        %7D%0A%0A        try %7B%0A            int pid = android.os.Process.myPid();%0A            final String path = %22/proc/%22 + pid + %22/stat%22;%0A            final BufferedReader reader = new BufferedReader(new FileReader(path));%0A            final String stat;%0A            try %7B%0A                stat = reader.readLine();%0A            %7D finally %7B%0A                reader.close();%0A            %7D%0A            final String field2End = %22) %22;%0A            final String fieldSep = %22 %22;%0A            final int fieldStartTime = 20;%0A            final int msInSec = 1000;%0A%0A            final String%5B%5D fields = stat.substring(stat.lastIndexOf(field2End)).split(fieldSep);%0A            final long t = Long.parseLong(fields%5BfieldStartTime%5D);%0A            int tckName;%0A            try %7B%0A                tckName = Class.forName(%22android.system.OsConstants%22).getField(%22_SC_CLK_TCK%22).getInt(null);%0A            %7D catch (ClassNotFoundException e) %7B%0A                tckName = Class.forName(%22libcore.io.OsConstants%22).getField(%22_SC_CLK_TCK%22).getInt(null);%0A            %7D%0A            final Object os = Class.forName(%22libcore.io.Libcore%22).getField(%22os%22).get(null);%0A            final long tck = (Long) os.getClass().getMethod(%22sysconf%22, Integer.TYPE).invoke(os, tckName);%0A            startTime = t * msInSec / tck;%0A        %7D catch (Exception e) %7B%0A            Log.v(%22JS%22, %22Failed to get process start time. Using the current time as start time. Error: %22 + e);%0A            startTime = SystemClock.elapsedRealtime();%0A        %7D%0A%0A        return startTime;%0A    %7D%0A%0A    public static long getUpTime() %7B%0A        long startTime = getStartTime();%0A        long currentTime = SystemClock.elapsedRealtime();%0A        return currentTime - startTime;%0A    %7D%0A%7D%0A

Add org.nativescript.Process.getUpTime() for android