示例#1
0
  /**
   * Time
   *
   * <p>Timestamp from PubNub Cloud.
   *
   * @return double timestamp.
   */
  public double time() {
    List<String> url = new ArrayList<String>();

    url.add("time");
    url.add("0");

    JSONArray response = _request(url);
    return response.optDouble(0);
  }
示例#2
0
 public double optDouble(int index) {
   return baseArgs.optDouble(index);
 }
 public ModelLocation(JSONArray location) {
   longitude = location.optDouble(0, 0);
   latitude = location.optDouble(1, 0);
 }