/*
 * Copyright 2010 TranceCode
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.  You may obtain a copy
 * of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */package org.trancecode.core;

import java.util.concurrent.TimeUnit;

/**
 * @author Herve Quiroz
 */
public final class TcThreads
{
    private TcThreads()
    {
        // No instantiation
    }

    public static boolean sleep(final long duration, final TimeUnit timeUnit)
    {
        try
        {
            Thread.sleep(timeUnit.toMillis(duration));
        }
        catch (final InterruptedException e)
        {
            return true;
        }

        return false;
    }
}

@@ -1,11 +1,10 @@
 /*
-%0D
 %0A * Copy
@@ -24,21 +24,19 @@
 anceCode
-%0D
 %0A *
-%0D
 %0A * Lice
@@ -106,17 +106,16 @@
  may not
-%0D
 %0A * use 
@@ -185,17 +185,16 @@
 n a copy
-%0D
 %0A * of t
@@ -206,21 +206,19 @@
 cense at
-%0D
 %0A *
-%0D
 %0A * http
@@ -259,13 +259,11 @@
 -2.0
-%0D
 %0A *
-%0D
 %0A * 
@@ -329,17 +329,16 @@
 software
-%0D
 %0A * dist
@@ -406,17 +406,16 @@
  WITHOUT
-%0D
 %0A * WARR
@@ -483,17 +483,16 @@
  See the
-%0D
 %0A * Lice
@@ -558,17 +558,16 @@
 itations
-%0D
 %0A * unde
@@ -580,17 +580,16 @@
 License.
-%0D
 %0A */pack
@@ -612,19 +612,17 @@
 de.core;
-%0D%0A%0D
+%0A
 %0Aimport 
@@ -655,16 +655,13 @@
 nit;
-%0D%0A%0D
+%0A
 %0A/**
-%0D
 %0A * 
@@ -684,14 +684,12 @@
 iroz
-%0D
 %0A */
-%0D
 %0Apub
@@ -717,12 +717,10 @@
 eads
-%0D
 %0A%7B
-%0D
 %0A   
@@ -739,24 +739,22 @@
 hreads()
-%0D
 %0A    %7B
-%0D
 %0A       
@@ -777,18 +777,15 @@
 tion
-%0D
 %0A    %7D
-%0D%0A%0D
+%0A
 %0A   
@@ -862,16 +862,14 @@
 nit)
-%0D
 %0A    %7B
-%0D
 %0A   
@@ -876,17 +876,16 @@
      try
-%0D
 %0A       
@@ -878,33 +878,32 @@
    try%0A        %7B
-%0D
 %0A            Thr
@@ -941,17 +941,16 @@
 ation));
-%0D
 %0A       
@@ -951,17 +951,16 @@
        %7D
-%0D
 %0A       
@@ -996,17 +996,16 @@
 ption e)
-%0D
 %0A       
@@ -1006,17 +1006,16 @@
        %7B
-%0D
 %0A       
@@ -1031,17 +1031,16 @@
 rn true;
-%0D
 %0A       
@@ -1045,11 +1045,9 @@
    %7D
-%0D%0A%0D
+%0A
 %0A   
@@ -1068,16 +1068,13 @@
 lse;
-%0D
 %0A    %7D
-%0D
 %0A%7D
-%0D
 %0A

Use UNIX file format