Examples of ceil()


Examples of hudson.scheduler.CronTab.ceil()

    @Override
    public long getRecurrencePeriod() {
        try {
            CronTab tab = getCronTab();
            GregorianCalendar now = new GregorianCalendar();
            Calendar nextExecution = tab.ceil(now.getTimeInMillis());
            long period = nextExecution.getTimeInMillis() - now.getTimeInMillis();
            if(nextExecution.getTimeInMillis() - now.getTimeInMillis()<=60000)
                period = period + 60000l; //add one minute to not shedule it during one minute one than once
            return period;          
        } catch (Exception ex) {
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.ceil()

    public @Test void testMathTool() {
        MathTool mathTool = (MathTool)toolbox.get("math");
        assertNotNull(mathTool);
        assertEquals(1,mathTool.abs(-1));
        assertEquals(2,mathTool.add(1,1));
        assertEquals(3,mathTool.ceil(2.5));
        assertEquals(4,mathTool.div(8,2));
        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
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.