~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/time.cc

  • Committer: Monty Taylor
  • Date: 2008-09-23 01:53:40 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: monty@inaugust.com-20080923015340-z8p6sbl7y27c4k30
Enabled -Wlong-long.

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
    sec=((ltime->day-1)*3600*24L+ltime->hour*3600+ltime->minute*60+
795
795
         ltime->second +
796
796
         sign* (int64_t) (interval.day*3600*24L +
797
 
                           interval.hour*3600LL+interval.minute*60LL+
 
797
                           interval.hour*3600L+interval.minute*60L+
798
798
                           interval.second))+ extra_sec;
799
799
    if (microseconds < 0)
800
800
    {
801
 
      microseconds+= 1000000LL;
 
801
      microseconds+= 1000000L;
802
802
      sec--;
803
803
    }
804
 
    days= sec/(3600*24LL);
805
 
    sec-= days*3600*24LL;
 
804
    days= sec/(3600*24L);
 
805
    sec-= days*3600*24L;
806
806
    if (sec < 0)
807
807
    {
808
808
      days--;
809
 
      sec+= 3600*24LL;
 
809
      sec+= 3600*24L;
810
810
    }
811
811
    ltime->second_part= (uint) microseconds;
812
812
    ltime->second= (uint) (sec % 60);
924
924
                               (uint) l_time2->day);
925
925
  }
926
926
 
927
 
  microseconds= ((int64_t)days*86400LL +
 
927
  microseconds= ((int64_t)days*86400L +
928
928
                 (int64_t)(l_time1->hour*3600L +
929
929
                            l_time1->minute*60L +
930
930
                            l_time1->second) -
931
931
                 l_sign*(int64_t)(l_time2->hour*3600L +
932
932
                                   l_time2->minute*60L +
933
 
                                   l_time2->second)) * 1000000LL +
 
933
                                   l_time2->second)) * 1000000L +
934
934
                (int64_t)l_time1->second_part -
935
935
                l_sign*(int64_t)l_time2->second_part;
936
936