APISonar


org.sonar.core.activity.Activity.time

> org > sonar > core > activity > Activity > time
org APIs sonar APIs core APIs activity APIs Activity APIs time APIs

Example 1
public void current_time_zone() {
    service.write(dbSession, Activity.Type.QPROFILE, "now");
    dbSession.commit();

    Activity activity = service.search(new ActivityQuery(), new QueryOptions()).getHits().get(0);
    assertThat(System.currentTimeMillis() - activity.time().getTime()).isLessThan(1000L);
  }