summaryrefslogtreecommitdiff
path: root/devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>2003-11-17 12:29:06 +0000
committerThomas Gellekum <tg@FreeBSD.org>2003-11-17 12:29:06 +0000
commit77de57715eaa7f5916568b4cc5abd98ede51b434 (patch)
treeafd81223ceebd2d0a9a8d6651f9d1e3556b8847a /devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp
parentUpdate to 2003.11.16. (diff)
New port ecos-tools. This will install the configuration tools
for the eCos embedded OS.
Notes
Notes: svn path=/head/; revision=94171
Diffstat (limited to 'devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp')
-rw-r--r--devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp b/devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp
new file mode 100644
index 000000000000..cb9b07ec0882
--- /dev/null
+++ b/devel/ecos-tools/files/patch-host::tools::Utils::common::eCosStd.cpp
@@ -0,0 +1,25 @@
+$FreeBSD$
+
+Index: ../ecos/host/tools/Utils/common/eCosStd.cpp
+===================================================================
+RCS file: /home/tg/cvs/ecos/host/tools/Utils/common/eCosStd.cpp,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 eCosStd.cpp
+--- host/tools/Utils/common/eCosStd.cpp 22 Aug 2003 11:37:35 -0000 1.1.1.1
++++ host/tools/Utils/common/eCosStd.cpp 6 Sep 2003 17:23:26 -0000
+@@ -33,10 +33,12 @@
+ SystemTimeToFileTime(&st,(FILETIME *)&ft);
+ return Time(ft)/10000;
+ #else // UNIX
+- struct timeb tp;
+- ftime(&tp);
++ struct timeval tv;
++ struct timezone tz;
++
++ gettimeofday(&tv, &tz);
+ // A negative time would be bad news, but we're not in touble until 2038
+- return 1000*Time(tp.time)+tp.millitm;
++ return 1000*Time(tv.tv_sec)+tv.tv_usec/1000;
+ #endif
+ }
+