Home | History | Annotate | Download | only in net

Lines Matching refs:cycle

148      * Compute the last cycle boundary for the given {@link NetworkPolicy}. For
149 * example, if cycle day is 20th, and today is June 15th, it will return May
150 * 20th. When cycle day doesn't exist in current month, it snaps to the 1st
163 // first, find cycle boundary for current month
164 final Time cycle = new Time(now);
165 cycle.hour = cycle.minute = cycle.second = 0;
166 snapToCycleDay(cycle, policy.cycleDay);
168 if (Time.compare(cycle, now) >= 0) {
169 // cycle boundary is beyond now, use last cycle boundary; start by
177 cycle.set(lastMonth);
178 snapToCycleDay(cycle, policy.cycleDay);
181 return cycle.toMillis(true);
193 // first, find cycle boundary for current month
194 final Time cycle = new Time(now);
195 cycle.hour = cycle.minute = cycle.second = 0;
196 snapToCycleDay(cycle, policy.cycleDay);
198 if (Time.compare(cycle, now) <= 0) {
199 // cycle boundary is before now, use next cycle boundary; start by
207 cycle.set(nextMonth);
208 snapToCycleDay(cycle, policy.cycleDay);
211 return cycle.toMillis(true);
215 * Snap to the cycle day for the current month given; when cycle day doesn't
222 // cycle day isn't valid this month; snap to last second of month