Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f58db441
Kaydet (Commit)
f58db441
authored
Eyl 29, 2011
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make this cross-platform.
üst
1fc21ed0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
26 deletions
+14
-26
osl_Mutex.cxx
sal/qa/osl/mutex/osl_Mutex.cxx
+9
-19
osl_Pipe.cxx
sal/qa/osl/pipe/osl_Pipe.cxx
+5
-7
No files found.
sal/qa/osl/mutex/osl_Mutex.cxx
Dosyayı görüntüle @
f58db441
...
...
@@ -68,32 +68,22 @@ inline void printBool( sal_Bool bOk )
*/
namespace
ThreadHelper
{
void
thread_sleep
(
sal_Int32
_nSec
)
void
thread_sleep_tenth_sec
(
sal_uInt32
_nTenthSec
)
{
TimeValue
nTV
;
nTV
.
Seconds
=
_nTenthSec
/
10
;
nTV
.
Nanosec
=
(
(
_nTenthSec
%
10
)
*
100000000
);
osl_waitThread
(
&
nTV
);
}
void
thread_sleep
(
sal_uInt32
_nSec
)
{
/// print statement in thread process must use fflush() to force display.
// t_print("# wait %d seconds. ", _nSec );
fflush
(
stdout
);
#ifdef WNT //Windows
Sleep
(
_nSec
*
1000
);
#endif
#if ( defined UNX ) //Unix
sleep
(
_nSec
);
#endif
thread_sleep_tenth_sec
(
_nSec
*
10
);
// printf("# done\n" );
}
void
thread_sleep_tenth_sec
(
sal_Int32
_nTenthSec
)
{
#ifdef WNT //Windows
Sleep
(
_nTenthSec
*
100
);
#endif
#if ( defined UNX ) //Unix
TimeValue
nTV
;
nTV
.
Seconds
=
static_cast
<
sal_uInt32
>
(
_nTenthSec
/
10
);
nTV
.
Nanosec
=
(
(
_nTenthSec
%
10
)
*
100000000
);
osl_waitThread
(
&
nTV
);
#endif
}
}
...
...
sal/qa/osl/pipe/osl_Pipe.cxx
Dosyayı görüntüle @
f58db441
...
...
@@ -881,18 +881,16 @@ namespace osl_StreamPipe
/** wait _nSec seconds.
*/
void
thread_sleep
(
sal_Int32
_nSec
)
void
thread_sleep
(
sal_
u
Int32
_nSec
)
{
/// print statement in thread process must use fflush() to force display.
// printf("wait %d seconds. ", _nSec );
fflush
(
stdout
);
#ifdef WNT //Windows
Sleep
(
_nSec
*
1000
);
#endif
#if ( defined UNX ) //Unix
sleep
(
_nSec
);
#endif
TimeValue
nTV
;
nTV
.
Seconds
=
_nSec
;
nTV
.
Nanosec
=
0
;
osl_waitThread
(
&
nTV
);
// printf("done\n" );
}
// test read/write & send/recv data to pipe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment