Skip to content

Commit

Permalink
[gnc-date.cpp] deprecate gnc_difftime
Browse files Browse the repository at this point in the history
because it casts time64 to doubles
  • Loading branch information
christopherlam committed Sep 8, 2024
1 parent 9c4ef93 commit d935ede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libgnucash/engine/gnc-date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ gnc_time (time64 *tbuf)
gdouble
gnc_difftime (const time64 secs1, const time64 secs2)
{
PWARN ("gnc_difftime is deprecated");
return (double)secs1 - (double)secs2;
}

Expand Down
1 change: 1 addition & 0 deletions libgnucash/engine/gnc-date.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ gchar* gnc_ctime (const time64 *secs);
time64 gnc_time (time64 *tbuf);

/** \brief Find the difference in seconds between two time values
* (deprecated)
* \param secs1: The first time value, in Seconds since
* 00:00:00 UTC 01 January 1970 (negative values are seconds before that moment)
* \param secs2: The second time value, in Seconds since
Expand Down

0 comments on commit d935ede

Please sign in to comment.