Poor man’s NTP
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 52980 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56420 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1475 | 13843728 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1485 | 13911916 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' ) | ../template-loader.php:52 |
| 5 | 0.1717 | 14004596 | the_content( ) | ../archive.php:35 |
| 6 | 0.1721 | 14005724 | apply_filters( ) | ../post-template.php:167 |
| 7 | 0.1742 | 14008444 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.1742 | 14008628 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.1742 | 14008964 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.1742 | 14012504 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.1742 | 14012728 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:6 |
| 12 | 0.1802 | 14029028 | fread ( ) | ../wp-vimcolor.php:105 |
Yesterday I had to quickly (more or less) synchronize the clocks of a handful of computers I was working on. I didn’t have the time to work out an NTP based solution, so I came up with the following simple trick:
Needless to say… it worked. :-)
Posted in Open Source Adventures, scripting No Comments »