Advertisement
Guest User

Java

a guest
Apr 6th, 2020
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. package com.cw.unity;
  2.  
  3. import android.util.Log;
  4.  
  5. public class MyPlugin {
  6.     private static final MyPlugin ourInstance = new MyPlugin();
  7.     private  static  final  String LOGTAG = "CW";
  8.     public static  MyPlugin getInstance() { return ourInstance; }
  9.  
  10.     private  long startTime;
  11.     private  MyPlugin(){
  12.         Log.i(LOGTAG, "Created blah-blah");
  13.         startTime = System.currentTimeMillis();
  14.     }
  15.  
  16.     public double getElapsedTime()
  17.     {
  18.         return (System.currentTimeMillis() - startTime)/1000.0f;
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement