summaryrefslogtreecommitdiff
path: root/time.c (follow)
Commit message (Collapse)AuthorAge
* Switch to SPDX identifiers.Andre Noll2026-03-17
| | | | | | | | Generated with sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h followed by manually tweaking the result a bit. No license change intended.
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* build: Remove compatibility check for clock_gettime().Andre Noll2017-01-04
| | | | | | | | Only Mac OS (which is no longer supported) did not have it. Moreover, on Linux we used to check whether one needs to link with -lrt to obtain clock_gettime(), which is necessary for glibc versions 2.16 and earlier (released in 2012). All distributions should have moved on to newer glibc versions by now, so let's get rid of the check.
* Update year in copyright headers.Andre Noll2015-01-12
| | | | | | | | | | | | | | | | Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
* time.c: Remove unused d2tv().Andre Noll2015-01-12
| | | | Found by cppcheck.
* doc: Change email address to maan@tuebingen.mpg.deAndre Noll2014-08-18
| | | | | | | | | | | | | | The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
* Change copyright year to 2014.Andre Noll2014-02-22
| | | | | | | | | This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
* time.c: Make declarations match definitions.Andre Noll2013-07-21
| | | | Also fix some whitespace issues.
* Replace gettimeofday() by clock_gettime().Andre Noll2013-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX.1-2008 marks gettimeofday() as obsolete, so let's switch to clock_gettime(). clock_gettime() operates on timespecs rather than on timevals like gettimeofday() does. Since timevals are extensively used in all parts of paraslash, and select() takes a timeval pointer as the timeout parameter, it seems to be easiest to add a new wrapper, clock_get_realtime(). It calls clock_gettime(), performs error checking (all errors are treated fatal and abort the program), and converts the result to a timeval. Another difference between gettimeofday() and clock_gettime() is that sys/time.h needs to be included for gettimeofday(), while clock_gettime() is declared in time.h which gets included from para.h. Hence we can remove the include statement for sys/time.h everywhere. Programs which call clock_gettime need to be linked against librt on glibc versions before 2.17 while BSD and newer glibc-based systems have no such requirement. To make matters more interesting, MacOS lacks clock_gettime() completely although this function conforms to SUSv2 and POSIX.1-2001. We'd like to avoid the unnecessary dependence on librt on systems that have clock_gettime() in -lc, and we must fall back to gettimeofday() on MacOS. Hence this commit also introduces a check in configure.ac which determines whether clock_gettime() is available and, if it is, whether -lrt is needed. Executables are only linked with -lrt if configure found that this is necessary.
* Change copyright year to 2013.Andre Noll2013-03-25
| | | | Better late than never.
* Change year in copyright message to 2012.Andre Noll2012-01-07
|
* doc: Minor doxygen fixes.Andre Noll2011-10-01
| | | | | | | | | doxygen's \cond and \endcond commands treat the word after the command as the name of the section which should be excluded from the documentatation. So it is wrong to put an arbitrary comment there. This fixes a couple of doxygen warnings about unknown loglevel defines and makes these defines actually show up in the generated HTML.
* time.c: Fix typo in comment.Andre Noll2011-09-16
|
* Replace 2010 in copyright message by 2011.Andre Noll2011-01-17
|
* Change year in COPYRIGHT to 2010.Andre Noll2010-04-05
| | | | Hey, this is earlier than last year :)
* time.c: tv_convex_combination() fixes.Andre Noll2010-01-30
| | | | Fix some typos, make it return zero if both coefficients are zero.
* tv_scale(): Avoid integer overflow.Andre Noll2009-09-19
| | | | | Just use an uint64_t and compute everything in microseconds which even simplifies the code a bit.
* Change year of copyright from 2008 to 2009.Andre Noll2009-01-10
|
* Minor documentation improvements.Andre Noll2008-11-22
|
* Move the get_chunk and the get_header functions from vss.c to afh.c.Andre Noll2008-03-15
| | | | Also move compute_chunk_time() to time.c.
* Change year in Copyright comment from 2007 to 2008.Andre Noll2008-01-08
|
* Fix tv_divide().Andre Noll2007-11-13
| | | | | | | | | | | | The old code contained an integer overflow which caused the mp3 audio format handler to compute the chunk of large mp3 files incorrectly. Moreover, the code was more complicated than necessary. So replace it by a simple calculation which just transforms the given struct timeval into its number of microseconds, does the division and transforms the quotient back to a struct timeval. Thanks to Gerrit Renker for pointing out the problem.
* Some documentation fixes.Andre Noll2007-09-15
| | | | MAke doxygen happy again and add documentation for com_setatt().
* time.c: Add GPL header and improve documentation.Andre Noll2007-09-15
|
* tv_divide(): Check for division by zeroAndre Noll2006-08-23
|
* fix some doxygen warningsAndre2006-06-28
| | | | These were introduced by the addition of -Wshadow.
* fix gcc warnings on shadowed declarationsAndre2006-06-23
|
* Rename MIN, MAX, ABS macrosAndre2006-04-15
| | | | MIN and MAX are already defined on MacOS.
* initial git commitAndre2006-02-20
Let's try if this works out.