Examples of Sleep


Examples of com.consol.citrus.model.testcase.core.Sleep

        return action;
    }

    @Override
    public Sleep convertModel(SleepAction definition) {
        Sleep action = new ObjectFactory().createSleep();

        action.setDescription(definition.getDescription());
        action.setMilliseconds(definition.getMilliseconds());
        action.setSeconds(definition.getSeconds());

        return action;
    }
View Full Code Here

Examples of com.fitbit.api.common.model.sleep.Sleep

        String userId = request.getParameter("userId");
        String date = request.getParameter("date");

        log.info("Get sleep by date :: userId = " + userId + ", date = " + date);
        List<String> messages = new ArrayList<String>();
        Sleep sleep = null;
        try {
            sleep = context.getApiClientService().getClient().getSleep(context.getOurUser(), new FitbitUser(userId), FitbitApiService.getValidLocalDateOrNull(date));
            String message = "Sleep for userId =  '" + userId + "'  received.";
            messages.add(message);
            log.info(message);
View Full Code Here

Examples of net.ex337.scriptus.model.api.functions.Sleep

   
    ScriptAction r = p.call();
   
    assertTrue("slept correctly", r instanceof Sleep);

    Sleep s = (Sleep)r;
   
    Calendar target = Calendar.getInstance();
    target.add(Calendar.YEAR, 1);
    target.add(Calendar.MONTH, 2);
    target.add(Calendar.DATE, 3);
    target.add(Calendar.HOUR, 4);
   
    Calendar c = s.getUntil();
   
    assertEquals("good year", target.get(Calendar.YEAR), c.get(Calendar.YEAR));
    assertEquals("good month", target.get(Calendar.MONTH), c.get(Calendar.MONTH));
    assertEquals("good day", target.get(Calendar.DATE), c.get(Calendar.DATE));
    assertEquals("good hour", target.get(Calendar.HOUR), c.get(Calendar.HOUR));
View Full Code Here

Examples of net.ex337.scriptus.model.api.functions.Sleep

    }
   
    Calendar until = getDuration(untilArg);
   
    ContinuationPending pending = Context.getCurrentContext().captureContinuation();
    pending.setApplicationState(new Sleep(until, rnd.nextLong()));
    throw pending;
  }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Sleep

        }
        return runners;
    }

    private static Sleep initSleep(Project project, int seconds) {
        Sleep sleep = new Sleep();
        sleep.setProject(project);
        sleep.setTaskName("sleep");
        sleep.setSeconds(seconds);
        return sleep;
    }
View Full Code Here

Examples of org.latte.scripting.hostobjects.Sleep

          throw new IllegalArgumentException(e);
        }
      }
    });
    register("thread", new Thread());
    register("sleep", new Sleep());
    register("shell", new Shell());
    register("open", new Open());
    register("hget", new HGet());
    register("hpost", new HPost());
    register("jdbc", new JDBC());
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Sleep

    if (!(entity instanceof Player) || type != Action.RIGHT_CLICK) {
      return;
    }

    final Player player = (Player) entity;
    Sleep sleep = player.get(Sleep.class);
    if (sleep == null) {
      return;
    }

    final Block head = getCorrectHalf(block, true);
    final World world = player.getWorld();
    final Sky sky = world.get(Sky.class);

    for (Entity e : world.getNearbyEntities(player, NEARBY_MONSTER_RANGE)) {
      if (e.get(Living.class) instanceof Hostile) {
        player.sendMessage(NEARBY_MONSTER_MESSAGE);
        return;
      }
    }

    if (sky != null && sky.getTime() < Time.DUSK.getTime()) {
      player.sendMessage(NOT_NIGHT_MESSAGE);
      return;
    }

    if (isOccupied(head)) {
      player.sendMessage(OCCUPIED_MESSAGE);
      return;
    }

    sleep.sleep(head);
  }
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Sleep

    final List<Player> playerList = getOwner().getPlayers();

    // Sleeping players
    boolean skipNight = false;
    for (Player player : playerList) {
      Sleep c = player.get(Sleep.class);
      if (c == null || c.canSkipNight()) {
        skipNight = true;
      } else {
        skipNight = false;
        break;
      }
    }

    if (skipNight) {
      time = Time.DAWN.getTime();
      for (Player player : playerList) {
        Sleep c = player.get(Sleep.class);
        if (c != null && player.isOnline()) {
          c.wake();
        }
      }
    }
    getData().put(VanillaData.WORLD_TIME, time);
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Sleep

    Entity entity = world.getEntity(message.getEntityId());

    Block block = world.getBlock(message.getX(), message.getY(), message.getZ());

    Sleep sleep = entity.get(Sleep.class);
    sleep.sleep(block);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.