Timer format

0 votes

timerService.GetCurrentTimenew App42CallBack() );   

public class betaPeriodIsValidCallBack : App42CallBack  

{  
    public void OnSuccess(object response)  
    {  
        Timer timer = (Timer)response;

 

When I make a call to timerService.GetCurrentTime() what is the format of the Timer response object in this callback code snippet? 

asked Nov 14, 2014 in AppWarp by huffman (17 points)

1 Answer

0 votes

Hello Huffman,

When you call GetCurrentTime function of timer service, it will return the current time in UTC time format as shown below. Please have a look at below code snippet & let us know if it helps: 

App42Log.SetDebug(true);                //Print output in your editor console

timerService.GetCurrentTime(new UnityCallBack()); 

public class UnityCallBack : App42CallBack

{

            public void OnSuccess(object response)

            {

                        Timer timer = (Timer)response;

                        App42Log.Console("Current Time is: " +timer.GetCurrentTime());

            }

            public void OnException(Exception e)

            {

                        App42Log.Console("Exception : " + e);

            }

}

 

Thanks,

Himanshu Sharma

answered Nov 14, 2014 by hs00105 (2,005 points)
I hope your query has been resolved, kindly let us know if you have more questions for us.
Thanks,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...