java/srcPubnubApi/com/pubnub/api/PubnubCore.java
/**
     * Read current time from PubNub Cloud.
     *
     * @param callback
     *            Callback object
     */
Read current time from PubNub Cloud.
@param callback
Callback object
Read current time from PubNub Cloud . @param callback Callback object
public void time(Callback callback) {
        final Callback cb = getWrappedCallback(callback);
        String[] url = { getPubnubUrl(), "time", "0" };
        HttpRequest hreq = new HttpRequest(url, params, new ResponseHandler() {
            public void handleResponse(HttpRequest hreq, String response) {
                cb.successCallback(null, response);
            }
            public void handleError(HttpRequest hreq, PubnubError error) {
                cb.errorCallback(null, error);
            }
        });
        _request(hreq, nonSubscribeManager);
    }
public void time ( Callback callback ) { final Callback cb = getWrappedCallback ( callback ) ; String [ ] url = { getPubnubUrl ( ) , "time" , "0" } ; HttpRequest hreq = new HttpRequest ( url , params , new ResponseHandler ( ) { public void handleResponse ( HttpRequest hreq , String response ) { cb . successCallback ( null , response ) ; } public void handleError ( HttpRequest hreq , PubnubError error ) { cb . errorCallback ( null , error ) ; } } ) ; _request ( hreq , nonSubscribeManager ) ; }
Read current time from PubNub Cloud.
Read current time from PubNub Cloud .